mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 23:27:55 -05:00
closes #263 maplist generator url params bug
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user