fix: lang not reset if value not match

This commit is contained in:
Methapon2001 2024-11-29 17:09:45 +07:00
parent 30dfa64930
commit 677cfb3756

View file

@ -52,7 +52,7 @@ 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) {
if (current !== Lang.English && current !== Lang.Thai) {
return setLang(Lang.Thai);
}