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

Cannot submit an empty query {} object when history.push() is called. #221

Closed
joual opened this issue Feb 1, 2016 · 0 comments
Closed

Comments

@joual
Copy link

joual commented Feb 1, 2016

If your location.search = '?debug=true&tabs=Q1' for example and you history.push(location) where location.query = {debug: 'true'} it will successfully remove the tabs=Q1 part of the queryString. But if you have location.search = '?tabs=Q1' and you history push a location object where query = {} it won't change the URL at all.

I believe the issue stems from this line right here: https://github.com/rackt/history/blob/master/modules/useQueries.js#L56

This was referenced Feb 3, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants