1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

add web device type, dont check password twice

This commit is contained in:
Kyle Spearrin
2018-06-07 17:11:17 -04:00
parent c59bca05bb
commit 8211e19db0
3 changed files with 7 additions and 0 deletions

View File

@@ -278,6 +278,10 @@ export class AddEditComponent {
}
async checkPassword() {
if (this.checkPasswordPromise != null) {
return;
}
if (this.cipher.login == null || this.cipher.login.password == null || this.cipher.login.password === '') {
return;
}
@@ -285,6 +289,7 @@ export class AddEditComponent {
this.analytics.eventTrack.next({ action: 'Check Password' });
this.checkPasswordPromise = this.auditService.passwordLeaked(this.cipher.login.password);
const matches = await this.checkPasswordPromise;
this.checkPasswordPromise = null;
if (matches > 0) {
this.toasterService.popAsync('warning', null, this.i18nService.t('passwordExposed', matches.toString()));