diff options
Diffstat (limited to 'frontend/static')
-rw-r--r-- | frontend/static/search.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/static/search.js b/frontend/static/search.js index b16cf30..8d30d89 100644 --- a/frontend/static/search.js +++ b/frontend/static/search.js @@ -12,7 +12,7 @@ let urlLocation = new URL(location); let state = history.state || { url: urlLocation.toString(), input: urlLocation.searchParams.get("query"), - fragment: range.cloneContents().innerHTML || "", + fragment: range.cloneContents().innerHTML || null, opened: [], }; @@ -147,7 +147,7 @@ if (state.opened.length > 0) { addEventListener("popstate", function (ev) { if (ev.state != null) { url = new URL(ev.state.url); - if (!url.pathname.endsWith("/search") && ev.state.fragment !== null) { + if (ev.state.fragment !== null) { queryInput.value = ev.state.input; renderFragmentHTML(ev.state.fragment); return; |