Skip to content

Commit 3b6d293

Browse files
authored
fix: handle missing i18n object (#837)
Release-as: 4.0.0-beta.11
1 parent ce099f9 commit 3b6d293

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ exports.generateRedirects = async ({ netlifyConfig, basePath, i18n }) => {
8383
// These can be ignored, as they're static files handled by the CDN
8484
return
8585
}
86-
if (i18n.defaultLocale && route.startsWith(`/${i18n.defaultLocale}/`)) {
86+
if (i18n?.defaultLocale && route.startsWith(`/${i18n.defaultLocale}/`)) {
8787
route = route.slice(i18n.defaultLocale.length + 1)
8888
}
8989
hasIsr = true

0 commit comments

Comments
 (0)