Skip to content
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

Make sure not to trigger getInitialProps on nav back from hash #7255

Merged
merged 1 commit into from
May 5, 2019

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented May 5, 2019

As mentioned in the thread this.asPath wasn't being set on a hash only change causing successive checks for hash only changes to return false. I added another test to the client-navigation suite to make sure this doesn't regress.

Fixes: #2825
Closes: #5519

prevent getInitialProps from firing when it shouldn't
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2019

Stats from current PR

Click to expand stats
zeit/next.js canary ijjk/next.js fix/hash-change-gip Change
Build Duration 15.7s 15.5s -212ms
node_modules Size 39.1 MB 39.1 MB ⚠️ +59 B
Total Bundle (main, webpack, commons) Size 209 kB 209 kB ⚠️ +11 B
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB ⚠️ +3 B
Client _app Size 2.6 kB 2.6 kB
Client _app gzip Size 1.07 kB 1.07 kB
Client _error Size 8.19 kB 8.19 kB
Client _error gzip Size 3.12 kB 3.12 kB
Client pages/index Size 288 B 288 B
Client pages/index gzip Size 222 B 222 B
Client pages/link Size 4.78 kB 4.78 kB
Client pages/link gzip Size 2.09 kB 2.09 kB
Client pages/routerDirect Size 411 B 411 B
Client pages/routerDirect gzip Size 296 B 296 B
Client pages/withRouter Size 393 B 393 B
Client pages/withRouter gzip Size 280 B 280 B
Client main Size 23.3 kB 23.3 kB
Client main gzip Size 7.63 kB 7.63 kB
Client commons Size 183 kB 183 kB ⚠️ +11 B
Client commons gzip Size 59.5 kB 59.5 kB ⚠️ +3 B
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 769 B 769 B
Base Rendered Size 1.34 kB 1.34 kB
Build Dir Size 802 kB 802 kB ⚠️ +53 B
Click to expand serverless stats
zeit/next.js canary ijjk/next.js fix/hash-change-gip Change
Build Duration 16.7s 16.6s -107ms
node_modules Size 39.1 MB 39.1 MB ⚠️ +59 B
Total Bundle (main, webpack, commons) Size 209 kB 209 kB ⚠️ +11 B
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB ⚠️ +3 B
Client _app Size 2.6 kB 2.6 kB
Client _app gzip Size 1.07 kB 1.07 kB
Client _error Size 8.19 kB 8.19 kB
Client _error gzip Size 3.12 kB 3.12 kB
Client pages/index Size 288 B 288 B
Client pages/index gzip Size 222 B 222 B
Client pages/link Size 4.78 kB 4.78 kB
Client pages/link gzip Size 2.09 kB 2.09 kB
Client pages/routerDirect Size 411 B 411 B
Client pages/routerDirect gzip Size 296 B 296 B
Client pages/withRouter Size 393 B 393 B
Client pages/withRouter gzip Size 280 B 280 B
Client main Size 23.3 kB 23.3 kB
Client main gzip Size 7.63 kB 7.63 kB
Client commons Size 183 kB 183 kB ⚠️ +11 B
Client commons gzip Size 59.5 kB 59.5 kB ⚠️ +3 B
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 769 B 769 B
Serverless pages/link Size 343 kB 343 kB ⚠️ +30 B
Serverless pages/link gzip Size 88.9 kB 88.9 kB ⚠️ +4 B
Serverless pages/index Size 334 kB 334 kB ⚠️ +30 B
Serverless pages/index gzip Size 86.5 kB 86.5 kB ⚠️ +3 B
Serverless pages/_error Size 335 kB 335 kB ⚠️ +30 B
Serverless pages/_error gzip Size 86.3 kB 86.3 kB ⚠️ +2 B
Serverless pages/routerDirect Size 334 kB 334 kB ⚠️ +30 B
Serverless pages/routerDirect gzip Size 86.5 kB 86.6 kB ⚠️ +3 B
Serverless pages/withRouter Size 335 kB 335 kB ⚠️ +30 B
Serverless pages/withRouter gzip Size 86.6 kB 86.7 kB ⚠️ +4 B
Build Dir Size 2.37 MB 2.37 MB ⚠️ +234 B

@lfades lfades merged commit a243bc4 into vercel:canary May 5, 2019
@ijjk ijjk deleted the fix/hash-change-gip branch May 5, 2019 19:36
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing hash in URL causes getInitialProps to be re-fired
2 participants