fix: 🐛 only set lang attr if lang is not nullish

 Closes: #133
This commit is contained in:
Christian Kaisermann 2021-03-27 17:18:17 -03:00
parent cb443f81f5
commit 1c516c9cda

View File

@ -35,7 +35,7 @@ export function getCurrentLocale() {
$locale.subscribe((newLocale: string) => { $locale.subscribe((newLocale: string) => {
current = newLocale; current = newLocale;
if (typeof window !== 'undefined') { if (typeof window !== 'undefined' && newLocale !== null) {
document.documentElement.setAttribute('lang', newLocale); document.documentElement.setAttribute('lang', newLocale);
} }
}); });