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:
parent
b31061dbeb
commit
1bbd179c55
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user