Auth - LoginComp - Focus logic bugfix - add null check to avoid error as focusInput was being called prematurely in some scenarios - confirmed the focus logic still works (#6095)

This commit is contained in:
Jared Snider 2023-08-31 18:06:47 -04:00 committed by GitHub
parent 302b0dfe74
commit ac1c7f9c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -182,6 +182,6 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
private focusInput() {
const email = this.loggedEmail;
document.getElementById(email == null || email === "" ? "email" : "masterPassword").focus();
document.getElementById(email == null || email === "" ? "email" : "masterPassword")?.focus();
}
}