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

fix: initial redirect breaks reactivity in static mode #753

Merged
merged 2 commits into from
Jun 5, 2020

Commits on Jun 3, 2020

  1. fix: initial redirect breaks reactivity in static mode

    When we've detected browser language and need to redirect we need to do
    it from the middleware for the page to transition correctly. The problem
    is Nuxt doesn't trigger middleware for initial navigation in static
    mode (the idea is that it already ran when generating page on the server),
    so we can't do it properly.
    
    Fixed by hooking into the VueRouter "beforeEach" navigation hook so that
    we can handle it from the right place. Still, as Nuxt doesn't know that
    we are redirecting, it would throw some errors trying to load previous
    page. So use "location.assign()" to "hard" redirect.
    
    Resolves #737
    rchl committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    ef80b0d View commit details
    Browse the repository at this point in the history
  2. chore: release 6.13.0-beta.0

    rchl committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    73e9a52 View commit details
    Browse the repository at this point in the history