aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/display.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-10-14 21:16:40 -0400
committerGitHub <noreply@github.com>2021-10-14 21:16:40 -0400
commit11f7591a7f5fcbfc3a3e631eaac0addb228c988a (patch)
treef7da7cb255d642554506341a5aa5635f6efc639f /ext/js/display/display.js
parentb3d38fce47fbcf3a0d5552cad73f5ebf2a21176c (diff)
Fix query being set to null when an empty search page is opened (#1988)
Diffstat (limited to 'ext/js/display/display.js')
-rw-r--r--ext/js/display/display.js3
1 files changed, 2 insertions, 1 deletions
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');