Catch errors in search worker

This commit is contained in:
squidfunk 2019-12-20 10:24:50 +01:00
parent b31061dbeb
commit 1bbd179c55

View File

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