From 1c516c9cda45e5a25dd466947804a5cc94734d22 Mon Sep 17 00:00:00 2001 From: Christian Kaisermann Date: Sat, 27 Mar 2021 17:18:17 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20only=20set=20lang=20attr?= =?UTF-8?q?=20if=20lang=20is=20not=20nullish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #133 --- src/runtime/stores/locale.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } });