1
0
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:
Patrick Pimentel
2025-01-06 12:14:18 -05:00
parent d8029acad2
commit 3ad055f325

View File

@@ -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);
}
}