diff --git a/assets/js/i18n.js b/assets/js/i18n.js index 7680a21ca..cd456941d 100644 --- a/assets/js/i18n.js +++ b/assets/js/i18n.js @@ -36,7 +36,7 @@ export const LOCALES = { export const DEFAULT_LOCALE = "en"; const htmlLang = document.querySelector("html").getAttribute("lang"); -const DEFAULT_BROWSER_LOCALE = htmlLang.length == 2 ? htmlLang : DEFAULT_LOCALE; +const DEFAULT_BROWSER_LOCALE = htmlLang?.length == 2 ? htmlLang : DEFAULT_LOCALE; export function getLocalePreference() { return settings.locale;