2018-08-24 12:30:27 +02:00
|
|
|
# `popstate` called with empty state
|
|
|
|
|
|
|
|
#### Why This Error Occurred
|
|
|
|
|
2019-03-07 17:40:08 +01:00
|
|
|
When using the browser back button the popstate event is triggered. Next.js sets
|
2018-08-24 12:30:27 +02:00
|
|
|
`popstate` event triggered but `event.state` did not have `url` or `as`, causing a route change failure
|
|
|
|
|
|
|
|
#### Possible Ways to Fix It
|
|
|
|
|
2019-03-07 17:40:08 +01:00
|
|
|
The only known cause of this issue is manually manipulating `window.history` instead of using `next/router`
|
2018-08-24 12:30:27 +02:00
|
|
|
|
|
|
|
### Useful Links
|
|
|
|
|
|
|
|
- [The issue this was reported in: #4994](https://github.com/zeit/next.js/issues/4994)
|