Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: UrlSearchParams being overwritten #68

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

monkeyWie
Copy link
Contributor

@monkeyWie monkeyWie commented Nov 22, 2023

I found a problem that if you make multiple assignments directly with url.searchParams, it overwrites the previous ones, see below code:

const url = new URL("https://test.com/");
url.searchParams.set("a", "1");
url.searchParams.set("b", "1");

// expect https://test.com/?a=1&b=1 but print https://test.com/?b=1
console.log(url.toString());

@dop251 dop251 merged commit e84d9a9 into dop251:master Nov 22, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants