mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-24 10:16:06 +03:00
fix: missed language code fallback (#1559)
This commit is contained in:
parent
a025b3b434
commit
cf76ba3114
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ export default defineNuxtPlugin(async (nuxt) => {
|
|||
|
||||
const supportLanguages = (locales as LocaleObject[]).map(locale => locale.code)
|
||||
if (!supportLanguages.includes(lang))
|
||||
userSettings.value.language = getDefaultLanguage(locales as string[])
|
||||
userSettings.value.language = getDefaultLanguage(supportLanguages)
|
||||
|
||||
watch([$$(lang), isHydrated], () => {
|
||||
if (isHydrated.value && lang !== i18n.locale)
|
||||
|
|
Loading…
Reference in a new issue