diff --git a/src/runtime/stores/locale.ts b/src/runtime/stores/locale.ts index 528ea6f..4ada4dd 100644 --- a/src/runtime/stores/locale.ts +++ b/src/runtime/stores/locale.ts @@ -35,7 +35,7 @@ export function getCurrentLocale() { $locale.subscribe((newLocale: string) => { current = newLocale; - if (typeof window !== 'undefined') { + if (typeof window !== 'undefined' && newLocale !== null) { document.documentElement.setAttribute('lang', newLocale); } });