Fix language switching. It now switches instantly

This commit is contained in:
Darko Gjorgjijoski
2024-04-16 02:58:44 +02:00
parent 223678e5bd
commit 1831560a62
2 changed files with 5 additions and 3 deletions

View File

@@ -79,8 +79,10 @@ export const useGlobalStore = (useWindow = false) => {
companyStore.selectedCompanyCurrency =
response.data.current_company_currency
global.locale.value =
response.data.current_user_settings.language || 'en'
if(typeof global.locale !== 'string') {
global.locale.value =
response.data.current_user_settings.language || 'en'
}
this.isAppLoaded = true
resolve(response)