fix: backward compat
This commit is contained in:
parent
972f6ba13e
commit
4f3d39bf59
1 changed files with 6 additions and 0 deletions
|
|
@ -51,7 +51,13 @@ export enum Lang {
|
|||
export function initLang(): Lang {
|
||||
const { locale } = i18n.global;
|
||||
const current = localStorage.getItem('currentLanguage') as Lang | null;
|
||||
|
||||
if (locale.value !== Lang.English && locale.value !== Lang.Thai) {
|
||||
return setLang(Lang.Thai);
|
||||
}
|
||||
|
||||
if (!current) return setLang(locale.value as Lang);
|
||||
|
||||
return setLang(current);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue