1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-28 09:20:52 +01:00

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: case SearchMessageType.QUERY:
return { return {
type: SearchMessageType.RESULT, type: SearchMessageType.RESULT,
data: index.search(message.data) data: index ? index.search(message.data) : []
} }
/* All other messages */ /* All other messages */