Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmaa committed Aug 29, 2024
1 parent 718e766 commit 3965b75
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ext/js/pages/settings/languages-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ export class LanguagesController {
/**
* @param {import('dom-data-binder').SettingChangedEvent} settingChangedEvent
*/
async _onLanguageSelectChanged(settingChangedEvent) {
_onLanguageSelectChanged(settingChangedEvent) {
// Check if there are language setting overrides and ask the user if they want to apply them
const existingSettings = await this._settingsController.getProfileSettings([{path: 'general.language'}]);
const existingLanguage = existingSettings[0].result;
const setLanguage = settingChangedEvent.detail.value;
if (typeof existingLanguage !== 'string' || typeof setLanguage !== 'string') { return; }
if (typeof setLanguage !== 'string') { return; }

const languageSettingOverrides = this._settingsController.getLanguageSettingOverrides(setLanguage);
if (this._lastSelectedLanguage !== '' && this._lastSelectedLanguage !== setLanguage && typeof languageSettingOverrides !== 'undefined') {
Expand All @@ -78,7 +76,7 @@ export class LanguagesController {
'Apply the default settings?',
);
if (yes) {
await this._settingsController.applyLanguageSettingOverrides(setLanguage);
void this._settingsController.applyLanguageSettingOverrides(setLanguage);
}
}
this._lastSelectedLanguage = setLanguage;
Expand Down

0 comments on commit 3965b75

Please sign in to comment.