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:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user