From 7ef5f9beabca4df63eec49e37888d78e2a064c07 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 12 Feb 2025 06:38:23 -0400 Subject: client: sidebar-search: never search an empty query Some code paths knida just take us here no matter what's actually entered into the input, so it's easiest to just dismiss empty queries every time. --- src/static/js/client/sidebar-search.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/static') diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js index c79fb837..60de5bc4 100644 --- a/src/static/js/client/sidebar-search.js +++ b/src/static/js/client/sidebar-search.js @@ -476,6 +476,10 @@ function trackSidebarSearchDownloadEnds(event) { async function activateSidebarSearch(query) { const {session, state} = info; + if (!query) { + return; + } + if (state.stoppedTypingTimeout) { clearTimeout(state.stoppedTypingTimeout); state.stoppedTypingTimeout = null; -- cgit 1.3.0-6-gf8a5