mirror of
https://github.com/bitwarden/browser
synced 2026-02-12 14:34:02 +00:00
refactor(email-verification-feature-flag): [PM-7882] Email Verification - Redid some logic for validate email.
This commit is contained in:
@@ -285,20 +285,12 @@ export class LoginComponentV1 extends CaptchaProtectedComponent implements OnIni
|
||||
}
|
||||
|
||||
async validateEmail() {
|
||||
const email = this.formGroup.get("email");
|
||||
if (!email) {
|
||||
this.logService.warning(
|
||||
`No email in form group when attempting to ${this.validateEmail.name}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.formGroup.controls.email.markAsTouched();
|
||||
const emailValid = email.valid;
|
||||
const emailValid = this.formGroup.controls.email.valid;
|
||||
|
||||
if (emailValid) {
|
||||
this.toggleValidateEmail(true);
|
||||
await this.getLoginWithDevice(this.formGroup.controls["email"].value);
|
||||
await this.getLoginWithDevice(this.formGroup.controls.email.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user