diff options
-rw-r--r-- | web_src/js/index.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index 553948bb36..32265748a5 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -2852,7 +2852,12 @@ function initVueComponents() { params.set('repo-search-page', `${this.page}`); } - window.history.replaceState({}, '', `?${params.toString()}`); + const queryString = params.toString(); + if (queryString) { + window.history.replaceState({}, '', `?${queryString}`); + } else { + window.history.replaceState({}, '', window.location.pathname); + } }, toggleArchivedFilter() { |