From fa5f6c09068add3951889961f545e6990d9c3ea7 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 10 Apr 2018 13:53:21 -0400 Subject: [PATCH] return boolean from generate password --- src/angular/components/add-edit.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/angular/components/add-edit.component.ts b/src/angular/components/add-edit.component.ts index c91e0b47eb..623dc38338 100644 --- a/src/angular/components/add-edit.component.ts +++ b/src/angular/components/add-edit.component.ts @@ -235,17 +235,18 @@ export class AddEditComponent { } catch { } } - async generatePassword() { + async generatePassword(): Promise { if (this.cipher.login != null && this.cipher.login.password != null && this.cipher.login.password.length) { const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t('overwritePasswordConfirmation'), this.i18nService.t('overwritePassword'), this.i18nService.t('yes'), this.i18nService.t('no')); if (!confirmed) { - return; + return false; } } this.onGeneratePassword.emit(); + return true; } togglePassword() {