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 duplicate query string params when hashbang is enabled #584

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasonwoan
Copy link

Problem

When hashbang is enabled, page.start() will re-add location.search params to the hash. This results in duplicate query params when the page is refreshed.

See #525 and #412

Proposed Fix

Add location.search params only when a query string has not been added to the hash.

Notes

It was a challenge to test this. I couldn't figure out how to supply a query string to the iframe window. I ended up configuring jsdom with a query string and testing against window.location. Please advise if there is a better approach.

@coveralls
Copy link

coveralls commented Jan 24, 2021

Coverage Status

Coverage increased (+0.4%) to 93.443% when pulling 5ce2222 on jasonwoan:fix/duplicate-qs into 4f99916 on visionmedia:master.

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.

None yet

3 participants