From 11f7591a7f5fcbfc3a3e631eaac0addb228c988a Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 14 Oct 2021 21:16:40 -0400 Subject: Fix query being set to null when an empty search page is opened (#1988) --- ext/js/display/display.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/js') diff --git a/ext/js/display/display.js b/ext/js/display/display.js index ed708b3a..882d69c9 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -832,7 +832,8 @@ class Display extends EventDispatcher { const wildcardsEnabled = (urlSearchParams.get('wildcards') !== 'off'); // Set query - const query = urlSearchParams.get('query'); + let query = urlSearchParams.get('query'); + if (query === null) { query = ''; } let queryFull = urlSearchParams.get('full'); queryFull = (queryFull !== null ? queryFull : query); let queryOffset = urlSearchParams.get('offset'); -- cgit v1.2.3