We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e9c098 commit 81ce185Copy full SHA for 81ce185
packages/runtime/src/helpers/redirects.ts
@@ -143,8 +143,8 @@ const generateStaticIsrRewrites = ({
143
return
144
}
145
// The default locale is served from the root, not the localised path
146
- if (i18n?.defaultLocale && route.startsWith(`/${i18n.defaultLocale}/`)) {
147
- route = route.slice(i18n.defaultLocale.length + 1)
+ if (i18n?.defaultLocale && route.startsWith(`/${i18n.defaultLocale}`)) {
+ route = route.slice(i18n.defaultLocale.length + 1) || '/'
148
staticRoutePaths.add(route)
149
if (matchesMiddleware(middleware, route)) {
150
staticIsrRoutesThatMatchMiddleware.push(route)
0 commit comments