From d0a70a9d4712385f402b2f467a5d788c291bd668 Mon Sep 17 00:00:00 2001 From: ItsuoSano Date: Wed, 26 Nov 2025 14:52:43 +0900 Subject: [PATCH] fix: route matcher warn --- src/runtime/server/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/server/plugin.ts b/src/runtime/server/plugin.ts index 4a7b804ef..14dbf1fb0 100644 --- a/src/runtime/server/plugin.ts +++ b/src/runtime/server/plugin.ts @@ -155,7 +155,7 @@ export default defineNitroPlugin(async (nitro) => { const detector = useDetectors(event, detection) const localeSegment = detector.route(event.path) const pathLocale = (isSupportedLocale(localeSegment) && localeSegment) || undefined - const path = (pathLocale && url.pathname.slice(pathLocale.length + 1)) ?? url.pathname + const path = (pathLocale && event.path.slice(pathLocale.length + 1)) ?? event.path // attempt to only run i18n detection for nuxt pages and i18n server routes if (!url.pathname.includes(__I18N_SERVER_ROUTE__) && !isExistingNuxtRoute(path)) {