From 1bbd179c55870ef2bec9eede52c034ff6d244bfc Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 20 Dec 2019 10:24:50 +0100 Subject: [PATCH] Catch errors in search worker --- src/assets/javascripts/workers/search/main/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/javascripts/workers/search/main/index.ts b/src/assets/javascripts/workers/search/main/index.ts index 246af581c..7c795f2f1 100644 --- a/src/assets/javascripts/workers/search/main/index.ts +++ b/src/assets/javascripts/workers/search/main/index.ts @@ -59,7 +59,7 @@ export function handler(message: SearchMessage): SearchMessage { case SearchMessageType.QUERY: return { type: SearchMessageType.RESULT, - data: index.search(message.data) + data: index ? index.search(message.data) : [] } /* All other messages */