From 3ad055f32537f17ba3f04aca667d4462238b4265 Mon Sep 17 00:00:00 2001 From: Patrick Pimentel Date: Mon, 6 Jan 2025 12:14:18 -0500 Subject: [PATCH] refactor(email-verification-feature-flag): [PM-7882] Email Verification - Redid some logic for validate email. --- .../src/auth/components/login-v1.component.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libs/angular/src/auth/components/login-v1.component.ts b/libs/angular/src/auth/components/login-v1.component.ts index 379f157b78a..94377e6a4f2 100644 --- a/libs/angular/src/auth/components/login-v1.component.ts +++ b/libs/angular/src/auth/components/login-v1.component.ts @@ -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); } }