Skip to content

Commit

Permalink
Prevent empty query parameter being set on dashboard (#11561)
Browse files Browse the repository at this point in the history
Prevent the dashboard from setting an empty query parameter

Fix #11543

Signed-off-by: Andrew Thornton [email protected]
  • Loading branch information
zeripath committed May 24, 2020
1 parent ae55dc7 commit 788b8b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web_src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 788b8b1

Please sign in to comment.