From de9c95673142ba668e115d9d52619386f9df5c3b Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Sat, 27 Jan 2024 16:49:33 +0100 Subject: [PATCH] chore: fix ui tests --- assets/js/i18n.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;