diff options
author | Eric Bailey <git@esb.lol> | 2023-12-11 17:34:18 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 15:34:18 -0800 |
commit | bae63f9bf0dbc40dd7ea99fde714e92b9fc83dc3 (patch) | |
tree | 8b4d06030dbd0603edb9345ba55c64eea44d4191 /src/locale/i18n.web.ts | |
parent | 3592f6f50b98c6bc81ebbf50f11f85df23376e53 (diff) | |
download | voidsky-bae63f9bf0dbc40dd7ea99fde714e92b9fc83dc3.tar.zst |
Patch bad migration, sanitize bad value (#2179)
Diffstat (limited to 'src/locale/i18n.web.ts')
-rw-r--r-- | src/locale/i18n.web.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/locale/i18n.web.ts b/src/locale/i18n.web.ts index 4e8b8d95d..bc484f303 100644 --- a/src/locale/i18n.web.ts +++ b/src/locale/i18n.web.ts @@ -2,6 +2,7 @@ import {useEffect} from 'react' import {i18n} from '@lingui/core' import {useLanguagePrefs} from '#/state/preferences' +import {sanitizeAppLanguageSetting} from '#/locale/helpers' export const locales = { en: 'English', @@ -29,6 +30,6 @@ export async function dynamicActivate(locale: string) { export async function useLocaleLanguage() { const {appLanguage} = useLanguagePrefs() useEffect(() => { - dynamicActivate(appLanguage) + dynamicActivate(sanitizeAppLanguageSetting(appLanguage)) }, [appLanguage]) } |