« get me outta code hell

client: don't restore ghost search results after query cleared - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-17 21:17:12 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:55 -0300
commit079509cd5b17aedbcec514ee33d63433ead993c4 (patch)
tree6f626af5c4dd82d32191d7a2da583ce4df59bc00
parent2aa6027d8fd867d613f9f1f3cbd11ebdbb39f4e0 (diff)
client: don't restore ghost search results after query cleared
-rw-r--r--src/static/js/client.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js
index 7f5990b9..e8de0472 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -3836,12 +3836,11 @@ function initializeSidebarSearchState() {
 
   if (session.activeQuery) {
     info.searchInput.value = session.activeQuery;
-  }
-
-  if (session.repeatQueryOnReload) {
-    activateSidebarSearch(session.activeQuery);
-  } else if (session.activeQueryResults) {
-    showSidebarSearchResults(JSON.parse(session.activeQueryResults));
+    if (session.repeatQueryOnReload) {
+      activateSidebarSearch(session.activeQuery);
+    } else if (session.activeQueryResults) {
+      showSidebarSearchResults(JSON.parse(session.activeQueryResults));
+    }
   }
 }