fix bug preventing locale from being loaded

This commit is contained in:
ChaosExAnima 2025-04-24 16:36:13 +02:00 committed by Renaud Chaput
parent cb75f0cabb
commit cd5257484c
No known key found for this signature in database
GPG Key ID: BCFC859D49B46990

View File

@ -22,9 +22,9 @@ export async function loadLocale() {
if (isLocaleLoaded()) return;
// If there is no locale file, then fallback to english
const localeFile = Object.hasOwn(localeFiles, '`./${locale}.json`')
const localeFile = Object.hasOwn(localeFiles, `./${locale}.json`)
? localeFiles[`./${locale}.json`]
: localeFiles[`./en.json`];
: localeFiles['./en.json'];
if (!localeFile) throw new Error('Could not load the locale JSON file');