mirror of
https://github.com/mastodon/mastodon.git
synced 2025-05-12 04:31:11 +00:00
fix bug preventing locale from being loaded
This commit is contained in:
parent
cb75f0cabb
commit
cd5257484c
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user