1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 10:33:57 +00:00

Fixed lint warnings (#1655)

This commit is contained in:
Vincent Salucci
2021-03-02 12:31:52 -06:00
committed by GitHub
parent 1a59c542bd
commit 61d7fcfc85
17 changed files with 48 additions and 41 deletions

View File

@@ -214,8 +214,8 @@ export class SettingsComponent implements OnInit {
// Request permission to use the optional permission for nativeMessaging
if (!this.platformUtilsService.isFirefox()) {
const hasPermission = await new Promise((resolve) => {
chrome.permissions.contains({permissions: ['nativeMessaging']}, resolve);
const hasPermission = await new Promise(resolve => {
chrome.permissions.contains({ permissions: ['nativeMessaging'] }, resolve);
});
if (!hasPermission) {
@@ -224,9 +224,9 @@ export class SettingsComponent implements OnInit {
this.i18nService.t('ok'), null);
const granted = await new Promise((resolve, reject) => {
chrome.permissions.request({permissions: ['nativeMessaging']}, resolve);
chrome.permissions.request({ permissions: ['nativeMessaging'] }, resolve);
});
if (!granted) {
await this.platformUtilsService.showDialog(
this.i18nService.t('nativeMessaginPermissionErrorDesc'), this.i18nService.t('nativeMessaginPermissionErrorTitle'),
@@ -254,23 +254,23 @@ export class SettingsComponent implements OnInit {
await this.cryptoService.toggleKey();
await Promise.race([
submitted.then((result) => {
submitted.then(result => {
if (result.dismiss === Swal.DismissReason.cancel) {
this.biometric = false;
this.storageService.remove(ConstantsService.biometricAwaitingAcceptance);
}
}),
this.platformUtilsService.authenticateBiometric().then((result) => {
this.platformUtilsService.authenticateBiometric().then(result => {
this.biometric = result;
Swal.close();
if (this.biometric === false) {
this.platformUtilsService.showToast('error', this.i18nService.t('errorEnableBiometricTitle'), this.i18nService.t('errorEnableBiometricDesc'));
}
}).catch((e) => {
}).catch(e => {
// Handle connection errors
this.biometric = false;
})
}),
]);
} else {
await this.storageService.remove(ConstantsService.biometricUnlockKey);