« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/search-worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/js/search-worker.js')
-rw-r--r--src/static/js/search-worker.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/static/js/search-worker.js b/src/static/js/search-worker.js
index 9a7827da..66c0cf2e 100644
--- a/src/static/js/search-worker.js
+++ b/src/static/js/search-worker.js
@@ -26,6 +26,7 @@ let status = null;
 let indexes = null;
 
 onmessage = handleWindowMessage;
+onerror = handleRuntimeError;
 postStatus('alive');
 
 Promise.all([
@@ -302,6 +303,10 @@ function importIndex(indexKey, indexData) {
   }
 }
 
+function handleRuntimeError() {
+  postStatus('runtime-error');
+}
+
 function handleWindowMessage(message) {
   switch (message.data.kind) {
     case 'action':