We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83c782a commit 858dcc5Copy full SHA for 858dcc5
src/methods/sendForm/sendForm.ts
@@ -13,7 +13,7 @@ const findHTMLForm = (form: string | HTMLFormElement): HTMLFormElement => {
13
currentForm = form;
14
}
15
16
- if (currentForm?.nodeName !== 'FORM') {
+ if (!currentForm || currentForm.nodeName !== 'FORM') {
17
throw 'The 3rd parameter is expected to be the HTML form element or the style selector of form';
18
19
0 commit comments