Skip to content

Commit ca61046

Browse files
authored
Prevent empty query parameter being set on dashboard (#11561) (#11604)
Prevent the dashboard from setting an empty query parameter Fix #11543 Signed-off-by: Andrew Thornton [email protected]
1 parent 2936830 commit ca61046

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

web_src/js/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2854,7 +2854,12 @@ function initVueComponents() {
28542854
params.set('repo-search-page', `${this.page}`);
28552855
}
28562856

2857-
window.history.replaceState({}, '', `?${params.toString()}`);
2857+
const queryString = params.toString();
2858+
if (queryString) {
2859+
window.history.replaceState({}, '', `?${queryString}`);
2860+
} else {
2861+
window.history.replaceState({}, '', window.location.pathname);
2862+
}
28582863
},
28592864

28602865
toggleArchivedFilter() {

0 commit comments

Comments
 (0)