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.
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 somewhere link. Notice that nothing is logged.
- Click the browser's back button. Notice that
getInitialProps is logged.
Your Environment
| Tech |
Version |
| next |
3.0.6 |
| node |
8.1.2 |
| OS |
macOS 10.12.6 |
| browser |
All |
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.
Expected Behavior
If the user clicks the
go somewherelink that leads to an anchor -- which will add a hash to the url -- and then clicks the back button,getInitialPropsshould not be called.Current Behavior
If the user clicks the
go somewherelink that leads to an anchor -- which will add a hash to the url -- and then clicks the back button,getInitialPropsis called.Steps to Reproduce (for bugs)
yarn.go somewherelink. Notice that nothing is logged.getInitialPropsis logged.Your Environment