about summary refs log tree commit diff
path: root/src/locale/i18n.web.ts
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-11 17:34:18 -0600
committerGitHub <noreply@github.com>2023-12-11 15:34:18 -0800
commitbae63f9bf0dbc40dd7ea99fde714e92b9fc83dc3 (patch)
tree8b4d06030dbd0603edb9345ba55c64eea44d4191 /src/locale/i18n.web.ts
parent3592f6f50b98c6bc81ebbf50f11f85df23376e53 (diff)
downloadvoidsky-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.ts3
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])
 }