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: redirect from 404 to defaultLocale if there is matching route #685

Merged
merged 3 commits into from
Apr 30, 2020

Commits on Apr 24, 2020

  1. fix: redirect from 404 to defaultLocale if there is matching route

    Changes the `setLocale` logic to, in case current route is 404, to
    try to find a matching one for current locale. This is for situations
    when using `prefix` strategy where the root (`/`) route doesn't exist.
    We will try to find and redirect to prefixed route matching resolved locale.
    
    Also worked around Nuxt issue (nuxt/nuxt#4491 )
    with `redirect` not working when called from a plugin in SPA mode.
    Required for the above fix above to be functional in SPA.
    
    Resolves #677
    Resolves #491
    rchl committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    b20bd58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9755387 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fd15e96 View commit details
    Browse the repository at this point in the history