« get me outta code hell

client: sidebar-search: don't crash midway through showing results - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-02-12 17:55:14 -0400
committer(quasar) nebula <qznebula@protonmail.com>2026-02-12 17:55:14 -0400
commitf227fe62e80f4671ed1e260680ae1adf6f80ba75 (patch)
tree94ecbfc592041c882b1e9749a701e34f03e71870 /src
parenta0ba32dfc1282a8ab3f38ccb7674444baca06279 (diff)
client: sidebar-search: don't crash midway through showing results
Diffstat (limited to 'src')
-rw-r--r--src/static/js/client/sidebar-search.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js
index 3239c65f..a06c95fd 100644
--- a/src/static/js/client/sidebar-search.js
+++ b/src/static/js/client/sidebar-search.js
@@ -920,7 +920,14 @@ function fillResultElements(results, {
   }
 
   for (const result of filteredResults) {
-    const el = generateSidebarSearchResult(result, filteredResults);
+    let el;
+    try {
+      el = generateSidebarSearchResult(result, filteredResults);
+    } catch (error) {
+      console.error(`Error showing result:`, result);
+      console.error(error);
+    }
+
     if (!el) continue;
 
     info.results.appendChild(el);