closes #263 maplist generator url params bug

This commit is contained in:
Kalle (Sendou)
2021-01-26 11:56:56 +02:00
parent e65d08a30e
commit 55d1bc1edc
2 changed files with 7 additions and 4 deletions

View File

@@ -26,10 +26,13 @@ export const setSearchParams = (
};
export const setManySearchParams = (
newParams: { key: string; value: string | string[] | undefined }[]
newParams: { key: string; value: string | string[] | undefined }[],
setAll?: boolean
) => {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const params = setAll
? new URLSearchParams()
: new URLSearchParams(url.search);
newParams.forEach(({ key, value }) => {
if (!value) {