Skip to content

Commit 858dcc5

Browse files
author
Sergey Khomushin
committed
sendForm: remove the Optional Chaining operator
1 parent 83c782a commit 858dcc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/methods/sendForm/sendForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const findHTMLForm = (form: string | HTMLFormElement): HTMLFormElement => {
1313
currentForm = form;
1414
}
1515

16-
if (currentForm?.nodeName !== 'FORM') {
16+
if (!currentForm || currentForm.nodeName !== 'FORM') {
1717
throw 'The 3rd parameter is expected to be the HTML form element or the style selector of form';
1818
}
1919

0 commit comments

Comments
 (0)