From cd47f3b238849506926ccd6cea2957ad3cf7901b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 13 May 2024 15:56:37 +0300 Subject: [PATCH] Fix loading locale data --- public/scripts/i18n.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/scripts/i18n.js b/public/scripts/i18n.js index c4e837939..6eff386d5 100644 --- a/public/scripts/i18n.js +++ b/public/scripts/i18n.js @@ -5,7 +5,9 @@ const storageKey = 'language'; const overrideLanguage = localStorage.getItem(storageKey); const localeFile = String(overrideLanguage || navigator.language || navigator.userLanguage || 'en').toLowerCase(); const langs = await fetch('/locales/lang.json').then(response => response.json()); -const localeData = await getLocaleData(localeFile); +// Don't change to let/const! It will break module loading. +// eslint-disable-next-line prefer-const +var localeData = await getLocaleData(localeFile); /** * Fetches the locale data for the given language.