mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[PM-13947] - guard against call to undefined onSubmit (#11795)
* guard against call to undefined function * revert input optional
This commit is contained in:
parent
97cd0d492c
commit
e00f22879c
@ -93,7 +93,7 @@ export class PaymentV2Component implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
protected submit = async () => {
|
protected submit = async () => {
|
||||||
const { type, token } = await this.tokenize();
|
const { type, token } = await this.tokenize();
|
||||||
await this.onSubmit({ type, token });
|
await this.onSubmit?.({ type, token });
|
||||||
this.submitted.emit(type);
|
this.submitted.emit(type);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ export class VerifyBankAccountComponent {
|
|||||||
this.formGroup.value.amount1,
|
this.formGroup.value.amount1,
|
||||||
this.formGroup.value.amount2,
|
this.formGroup.value.amount2,
|
||||||
);
|
);
|
||||||
await this.onSubmit(request);
|
await this.onSubmit?.(request);
|
||||||
this.submitted.emit();
|
this.submitted.emit();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ export class ManageTaxInformationComponent implements OnInit, OnDestroy {
|
|||||||
if (this.formGroup.invalid) {
|
if (this.formGroup.invalid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await this.onSubmit(this.taxInformation);
|
await this.onSubmit?.(this.taxInformation);
|
||||||
this.taxInformationUpdated.emit();
|
this.taxInformationUpdated.emit();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user