mirror of
https://github.com/bitwarden/web
synced 2025-12-18 09:13:17 +00:00
Remove empty catch blocks, and update tslint rule (#1226)
This commit is contained in:
@@ -10,6 +10,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 { EmergencyAccessType } from 'jslib-common/enums/emergencyAccessType';
|
||||
import { EmergencyAccessInviteRequest } from 'jslib-common/models/request/emergencyAccessInviteRequest';
|
||||
@@ -39,7 +40,7 @@ export class EmergencyAccessAddEditComponent implements OnInit {
|
||||
waitTime: number;
|
||||
|
||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||
private toasterService: ToasterService) { }
|
||||
private toasterService: ToasterService, private logService: LogService) { }
|
||||
|
||||
async ngOnInit() {
|
||||
this.editMode = this.loading = this.emergencyAccessId != null;
|
||||
@@ -60,7 +61,9 @@ export class EmergencyAccessAddEditComponent implements OnInit {
|
||||
const emergencyAccess = await this.apiService.getEmergencyAccess(this.emergencyAccessId);
|
||||
this.type = emergencyAccess.type;
|
||||
this.waitTime = emergencyAccess.waitTimeDays;
|
||||
} catch { }
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
} else {
|
||||
this.title = this.i18nService.t('inviteEmergencyContact');
|
||||
this.waitTime = this.waitTimes[2].value;
|
||||
@@ -90,7 +93,9 @@ export class EmergencyAccessAddEditComponent implements OnInit {
|
||||
this.toasterService.popAsync('success', null,
|
||||
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
|
||||
this.onSaved.emit();
|
||||
} catch { }
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async delete() {
|
||||
|
||||
Reference in New Issue
Block a user