From a49c4458d3588b35308361e3a6744d830a18a5af Mon Sep 17 00:00:00 2001 From: Alec Rippberger Date: Fri, 18 Oct 2024 09:30:21 -0500 Subject: [PATCH] Replace loggedEmail with this.emailFormControl.value. --- libs/auth/src/angular/login/login.component.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index 56cc3e442c..66c47b8b3c 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -98,10 +98,6 @@ export class LoginComponent implements OnInit, OnDestroy { return this.formGroup.controls.email; } - get loggedEmail(): string { - return this.formGroup.value.email; - } - get uiState(): LoginUiState { return this.validatedEmail ? LoginUiState.MASTER_PASSWORD_ENTRY : LoginUiState.EMAIL_ENTRY; } @@ -476,12 +472,17 @@ export class LoginComponent implements OnInit, OnDestroy { } private focusInput() { - const email = this.loggedEmail; - document.getElementById(email == null || email === "" ? "email" : "masterPassword")?.focus(); + document + .getElementById( + this.emailFormControl.value == null || this.emailFormControl.value === "" + ? "email" + : "masterPassword", + ) + ?.focus(); } private async defaultOnInit(): Promise { - await this.getLoginWithDevice(this.loggedEmail); + await this.getLoginWithDevice(this.emailFormControl.value); // If there's an existing org invite, use it to get the password policies const orgPolicies = await this.loginComponentService.getOrgPolicies();