-
Notifications
You must be signed in to change notification settings - Fork 687
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
Change history state during navigation, break page.js #293
Comments
No one? |
+1 |
Updating |
FWIW, adding a path property to the first argument passed to pushState() helped when this error arose in my project. ex: let newUrl = window.location.href + '?foo=bar';
window.history.pushState({path: newUrl}, null, newUrl); |
I am hitting this also(latest 1.10.*) Changing the key to
|
I am using pushstate for my SPA app... where when a user consumes a api for a search, I update the url query string with the search params without reloading the page. Anyone know how I can do this without pushState so page.js won't break? This has put me in a bind. |
I see that a possible solution would be to use the pushState method that is binded to context object. Since page is global, how could I access Here is the snippet where I consume a api and I want to sync the url to resemble the search:
|
Anyone? |
Anyone? I'm going have to rip out the whole routing system and replace it because of this bug. It would be nice if the maintainers could offer suggestions or reason why this bug still exists. |
Anyone? |
Can you produce a code example or test for what is failing? I can't tell from the comments. |
Than you for your reply. This is how I sync the api query string with the url
And here are the two routes involved:
|
Hi, any luck with this? |
I'll paypal $50.00 to fix this bug |
Hi!
I have to change history state during the change of a slide of a slider in my webpage.
I use history.js:
I also have a route registered with page.js:
When i use back and forward browser button, i got this error:
Uncaught TypeError: Cannot read property '0' of undefined
The error is from the page.js file, in this function, at the second line:
Anyone knows how i can manipulate history state, while using page.js?
Thanks
The text was updated successfully, but these errors were encountered: