mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03: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:
|
||||
return {
|
||||
type: SearchMessageType.RESULT,
|
||||
data: index.search(message.data)
|
||||
data: index ? index.search(message.data) : []
|
||||
}
|
||||
|
||||
/* All other messages */
|
||||
|
Loading…
Reference in New Issue
Block a user