-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: redirect loop on initial load (static mode & route with no locale)
On initial load, if: - the Nuxt target was set to "static" - the loaded route had locales disabled Then we've attempted to redirect even when redirect path equaled the current path. That has triggered an infinite redirect loop. Fix by not setting a redirect when it matches the current path. Resolves #798
- Loading branch information
Showing
4 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<div> | ||
<LangSwitcher /> | ||
<div id="current-page">page: {{ $t('about') }}</div> | ||
<nuxt-link id="link-home" exact :to="localePath('index')">{{ $t('home') }}</nuxt-link> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import LangSwitcher from '../components/LangSwitcher' | ||
export default { | ||
components: { | ||
LangSwitcher | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters