From 118716d9251943e8feff379e01a7080c7e5f0b0a Mon Sep 17 00:00:00 2001 From: Cameron Gilchrist Date: Thu, 31 Aug 2023 16:33:35 +0900 Subject: [PATCH] check for hits before generating color scheme --- frontend/ResultMixin.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/ResultMixin.vue b/frontend/ResultMixin.vue index 4a734bd..552e470 100644 --- a/frontend/ResultMixin.vue +++ b/frontend/ResultMixin.vue @@ -82,6 +82,9 @@ export default { return target; }, setColorScheme() { + if (!this.hits) { + return; + } var color = colorScale(); for (let result of (__LOCAL__) ? this.currentResult.results : this.hits.results) { result.color = color(result.db);