mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
Remove empty catch blocks, and update tslint rule (#1226)
This commit is contained in:
@@ -8,6 +8,7 @@ import { ToasterService } from 'angular2-toaster';
|
||||
|
||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
|
||||
import { TwoFactorProviderType } from 'jslib-common/enums/twoFactorProviderType';
|
||||
@@ -26,7 +27,8 @@ export abstract class TwoFactorBaseComponent {
|
||||
protected masterPasswordHash: string;
|
||||
|
||||
constructor(protected apiService: ApiService, protected i18nService: I18nService,
|
||||
protected toasterService: ToasterService, protected platformUtilsService: PlatformUtilsService) { }
|
||||
protected toasterService: ToasterService, protected platformUtilsService: PlatformUtilsService,
|
||||
protected logService: LogService) { }
|
||||
|
||||
protected auth(authResponse: any) {
|
||||
this.masterPasswordHash = authResponse.masterPasswordHash;
|
||||
@@ -37,7 +39,9 @@ export abstract class TwoFactorBaseComponent {
|
||||
try {
|
||||
await enableFunction();
|
||||
this.onUpdated.emit(true);
|
||||
} catch { }
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected async disable(promise: Promise<any>) {
|
||||
@@ -60,6 +64,8 @@ export abstract class TwoFactorBaseComponent {
|
||||
this.enabled = false;
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('twoStepDisabled'));
|
||||
this.onUpdated.emit(false);
|
||||
} catch { }
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user