We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42d431d commit 30ee7abCopy full SHA for 30ee7ab
src/hooks/useI18n.ts
@@ -31,7 +31,7 @@ export const buildI18nContext = (locale: Accessor<TranslatePair>): I18nContext =
31
export function useI18n() {
32
let defaultLocale = providerSettingsMap.get()?.general?.locale ?? 'en'
33
providerSettingsMap.listen((value, changedKey) => {
34
- const general = value[changedKey] as unknown as GeneralSettings
+ const general = value[changedKey ?? 'general'] as unknown as GeneralSettings
35
defaultLocale = general?.locale
36
defaultLocale && setCurrentLocale(locales[defaultLocale as string])
37
})
0 commit comments