1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 04:03:29 +00:00

[Account Recovery][PM-18721] add type check

This commit is contained in:
rr-bw
2025-05-28 15:03:23 -07:00
parent 1fccdde5b8
commit 60e2bdcb5f

View File

@@ -80,7 +80,7 @@ type AccountRecoveryDialogResultType =
})
export class AccountRecoveryDialogComponent {
@ViewChild(InputPasswordComponent)
inputPasswordComponent!: InputPasswordComponent;
inputPasswordComponent: InputPasswordComponent | undefined = undefined;
private parentSubmittingBehaviorSubject = new BehaviorSubject(false);
parentSubmitting$ = this.parentSubmittingBehaviorSubject.asObservable();
@@ -115,6 +115,10 @@ export class AccountRecoveryDialogComponent {
) {}
handlePrimaryButtonClick = async () => {
if (!this.inputPasswordComponent) {
throw new Error("InputPasswordComponent is not initialized");
}
await this.inputPasswordComponent.submit();
};