fix(next): respect fallback locale null value (#6207)

This commit is contained in:
Ritsu
2024-05-10 16:27:13 +03:00
committed by GitHub
parent f6e77b845b
commit e96ff90029

View File

@@ -62,7 +62,7 @@ export const sanitizeLocales = ({
locale,
localization,
}: SanitizeLocalesArgs): SanitizeLocalesReturn => {
if (fallbackLocale === 'none') {
if (['none', 'null'].includes(fallbackLocale)) {
fallbackLocale = 'null'
} else if (localization && !localization.localeCodes.includes(fallbackLocale)) {
fallbackLocale = localization.defaultLocale