-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Description
Changing the hash in the URL causes getInitialProps to be fired, which I think should've been fixed in this PR. See the following example repo: https://github.com/ldthorne/nextjs-back-reproduction.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
If the user clicks the go somewhere link that leads to an anchor -- which will add a hash to the url -- and then clicks the back button, getInitialProps should not be called.
Current Behavior
If the user clicks the go somewhere link that leads to an anchor -- which will add a hash to the url -- and then clicks the back button, getInitialProps is called.
Steps to Reproduce (for bugs)
- Clone repo: https://github.com/ldthorne/nextjs-back-reproduction.
yarn.- Open dev tools.
- Click the
go somewherelink. Notice that nothing is logged. - Click the browser's back button. Notice that
getInitialPropsis logged.
Your Environment
| Tech | Version |
|---|---|
| next | 3.0.6 |
| node | 8.1.2 |
| OS | macOS 10.12.6 |
| browser | All |
michaeljonathanblack
Metadata
Metadata
Assignees
Labels
No labels