1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/errors/popstate-state-empty.md
Tim Neutkens 0dd2b2aa74
Add warning for broken popstate (#5000)
* Add warning for undefined url and as coming from popstate

* Use consistent url

* Fix err.sh link in test

* Rename `inital` => `initial`
2018-08-24 12:30:27 +02:00

500 B

popstate called with empty state

Why This Error Occurred

When using the browser back button the popstate event is triggered. Next.js sets popstate event triggered but event.state did not have url or as, causing a route change failure

Possible Ways to Fix It

The only known cause of this issue is manually manipulating window.history instead of using next/router