-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix(vue-app): middleware not executing on double browser back navigation #6775
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #6775 +/- ##
==========================================
- Coverage 64.82% 64.75% -0.08%
==========================================
Files 78 78
Lines 2718 2721 +3
Branches 706 708 +2
==========================================
Hits 1762 1762
- Misses 729 730 +1
- Partials 227 229 +2
Continue to review full report at Codecov.
|
Actually this makes sense, even if I cannot reproduce it on my machine (might be too fast). Can you reproduce this on your slower machine when running |
@atinux yes, I am able to reproduce this in production mode. |
007c785
to
a84f31d
Compare
# Conflicts: # packages/vue-app/template/server.js
Thanks @jsonpoindexter |
Types of changes
Description
When a Nuxt app is in Universal mode it is possible that in some cases a component's middleware does not execute.
This can happen when a user first navigates to a project page (example: Page B), server.js executes and then before client.js executes the user navigates to another page in the project (example: Page A). In this scenario https://github.com/nuxt/nuxt.js/blob/dev/packages/vue-app/template/client.js#L810 will evaluate to
TRUE
and not execute the middleware(s) for page A.Resolves: https://cmty.app/nuxt/nuxt.js/issues/c10049 / #6716
Checklist:
I could not find a way to programmatically reproduce this issue ie. changes routes after server.js has executed, but before client.js executes.