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 */