« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/static/js/client/sidebar-search.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js
index 0d1dbaaf..62e900ee 100644
--- a/src/static/js/client/sidebar-search.js
+++ b/src/static/js/client/sidebar-search.js
@@ -765,6 +765,11 @@ function recordActiveQueryContext() {
     return;
   }
 
+  // We also don't overwrite existing context.
+  if (session.activeQueryContextPagePathname) {
+    return;
+  }
+
   session.activeQueryContextPageName =
     decodeEntities(document.querySelector('title').dataset.withoutWikiName) ||
     document.title;