Skip to content

Commit

Permalink
Filter out empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonXLF committed Apr 26, 2024
1 parent b5355a6 commit 9121367
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ function submitForm(pushState) {
page: pageLookup.getValue(),
namespaces: namespacesSelect.getValue().join(',')
},
query = Object.keys(params).map(param => {
return param + '=' + params[param];
}).join('&');
query = Object.keys(params)
.filter(param => params[param])
.map(param => param + '=' + params[param])
.join('&');

if (pushState) {
history.pushState({}, null, (query ? '?' : '') + query);
Expand Down

0 comments on commit 9121367

Please sign in to comment.