fix(sentry): syntaxError: No error message (#13954)

This commit is contained in:
Sivin Varghese
2026-03-31 21:09:02 +05:30
committed by GitHub
parent 5de7ae492c
commit 8824efe0e1
3 changed files with 13 additions and 8 deletions

View File

@@ -98,7 +98,9 @@ export default {
mql.onchange = e => setColorTheme(e.matches); mql.onchange = e => setColorTheme(e.matches);
}, },
setLocale(locale) { setLocale(locale) {
if (locale) {
this.$root.$i18n.locale = locale; this.$root.$i18n.locale = locale;
}
}, },
async initializeAccount() { async initializeAccount() {
await this.$store.dispatch('accounts/get'); await this.$store.dispatch('accounts/get');

View File

@@ -103,7 +103,10 @@ export default {
const { name, locale, id, domain, support_email, features } = const { name, locale, id, domain, support_email, features } =
this.getAccount(this.accountId); this.getAccount(this.accountId);
this.$root.$i18n.locale = this.uiSettings?.locale || locale; const effectiveLocale = this.uiSettings?.locale || locale;
if (effectiveLocale) {
this.$root.$i18n.locale = effectiveLocale;
}
this.name = name; this.name = name;
this.locale = locale; this.locale = locale;
this.id = id; this.id = id;
@@ -129,11 +132,9 @@ export default {
support_email: this.supportEmail, support_email: this.supportEmail,
}); });
// If user locale is set, update the locale with user locale // If user locale is set, update the locale with user locale
if (this.uiSettings?.locale) { const updatedLocale = this.uiSettings?.locale || this.locale;
this.$root.$i18n.locale = this.uiSettings?.locale; if (updatedLocale) {
} else { this.$root.$i18n.locale = updatedLocale;
// If user locale is not set, update the locale with account locale
this.$root.$i18n.locale = this.locale;
} }
this.getAccount(this.id).locale = this.locale; this.getAccount(this.id).locale = this.locale;
useAlert(this.$t('GENERAL_SETTINGS.UPDATE.SUCCESS')); useAlert(this.$t('GENERAL_SETTINGS.UPDATE.SUCCESS'));

View File

@@ -35,7 +35,9 @@ export default {
}; };
}, },
setLocale(locale) { setLocale(locale) {
if (locale) {
this.$root.$i18n.locale = locale; this.$root.$i18n.locale = locale;
}
}, },
}, },
}; };