-
Notifications
You must be signed in to change notification settings - Fork 476
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
removeQuery with value filter doesn't work when the parameter value is not plural / an array / collection. #250
Comments
I'm not sure I follow the plural / array / collection thought. The problem is the type of the value you're trying to remove. To URI.js all query string values are strings. var uri = "http://localhost:2039/product?t=1&q=test";
URI(uri).removeQuery({t : 1}).toString();
// "http://localhost:2039/product?t=1&q=test"
URI(uri).removeQuery({t : "1"}).toString();
// "http://localhost:2039/product?q=test" I admit URI.js could've done a better job with casting the value to string itself. To fix that, you'd sinply check for |
Very interesting insight. I originally thought it was array removal problem because |
To resolve arrays Will you prepare a PR? |
Sorry for the wait! I just got home. Made the PR. Thanks in advance! |
fixed by #252 |
released in v1.17.0 |
Example:
Expected returned value:
http://localhost:2039/product?q=test
Actual returned value:
http://localhost:2039/product?t=1&q=test
How I tackled the problem atm:
The text was updated successfully, but these errors were encountered: