diff --git a/src/plugin/onCreatePage.ts b/src/plugin/onCreatePage.ts index d5dc90b..9849486 100644 --- a/src/plugin/onCreatePage.ts +++ b/src/plugin/onCreatePage.ts @@ -102,7 +102,7 @@ export const onCreatePage = async ( routed: true }); const regexp = new RegExp('/404/?$'); - if (regexp.test(localePage.path)) { + if (regexp.test(localePage.path && lng !== defaultLanguage) { localePage.matchPath = `/${lng}/*`; } if (localePage.matchPath !== undefined) {