diff --git a/pages/[...all].vue b/pages/[...all].vue index d3ec3682..8351a191 100644 --- a/pages/[...all].vue +++ b/pages/[...all].vue @@ -18,11 +18,15 @@ const { t } = useI18n(); const { $i18n } = useNuxtApp(); const { locale } = useI18n(); const defaultLocale = $i18n.defaultLocale; -const routePath = +let routePath = locale.value !== defaultLocale - ? route.path.replace(/^\/[^/]+/, '') + ? route.path.replace(/^\/[^\/]+/, '') : route.path; +if (routePath === '') { + routePath = '/'; +} + const { data: seoResult } = await useAsyncData(`seoPath${routePath}`, async () => { // For client links if the history state contains seo url information we can omit the api call if (import.meta.client) {