From da7a0b66ca9717bceb8ed9bbad1c08b1cf32780d Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Tue, 13 Jun 2023 16:20:45 +0900 Subject: [PATCH] Revert "fix: check if route is defined by i18n before redirect (#1902)" This reverts commit 182098bebc9cb8c952ec849333c133c920288048. --- src/runtime/utils.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/runtime/utils.ts b/src/runtime/utils.ts index 9dd150b88..6b872d645 100644 --- a/src/runtime/utils.ts +++ b/src/runtime/utils.ts @@ -294,10 +294,6 @@ export function detectRedirect( let redirectPath = '' const isStaticGenerate = isSSG && process.server - if (!isI18nRouteDefined(route)) { - return redirectPath - } - // decide whether we should redirect to a different route. if ( !isStaticGenerate && @@ -511,9 +507,5 @@ export function extendBaseUrl( return baseUrl } } -function isI18nRouteDefined(route: Route | RouteLocationNormalized | RouteLocationNormalizedLoaded): boolean { - const i18nLocales = route.matched[0]?.meta.nuxtI18n - return i18nLocales ? Object.keys(i18nLocales).length > 0 : false -} /* eslint-enable @typescript-eslint/no-explicit-any */