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

Constructor taking sequence-style input produces wrong output #40

Closed
burtyish opened this issue Jun 30, 2019 · 2 comments
Closed

Constructor taking sequence-style input produces wrong output #40

burtyish opened this issue Jun 30, 2019 · 2 comments

Comments

@burtyish
Copy link

According MDN, the following usages of the constructor should be equivalent:

// Pass in a sequence
var params3 = new URLSearchParams([["foo", 1],["bar", 2]]);

// Pass in a record
var params4 = new URLSearchParams({"foo" : 1 , "bar" : 2});

However, given the first ('sequence') style, the constructor will produce the following:
'0=a%2C1&1=b%2C2' (encoded '0=a,1&1=b,2')

@jerrybendy
Copy link
Owner

Hi,

Thanks for your issue. I have fixed this and released v7.0.0.

@burtyish
Copy link
Author

Thanks for the swift response!

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

No branches or pull requests

2 participants