Skip to content

Commit 780fdc6

Browse files
committed
chore: use isHTMLFormElement function
Signed-off-by: Logan McAnsh <[email protected]>
1 parent 1b0c009 commit 780fdc6

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

packages/form-data/src/form-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class FormData {
1515

1616
Object.defineProperty(this, "_entries", { enumerable: false });
1717

18-
if (form !== undefined) {
18+
if (isHTMLFormElement(form)) {
1919
for (const element of form.elements) {
2020
if (isSelectElement(element)) {
2121
for (const option of element.options) {

packages/form-data/test/form-data.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ export const test = (test) => {
261261
});
262262

263263
test("Should allow passing a form element", () => {
264-
265264
class FakeForm {
266265
get [Symbol.toStringTag]() {
267266
return "HTMLFormElement";

0 commit comments

Comments
 (0)