diff --git a/lib/web/fetch/formdata.js b/lib/web/fetch/formdata.js index e21ee3f553e..c21fb06a3ee 100644 --- a/lib/web/fetch/formdata.js +++ b/lib/web/fetch/formdata.js @@ -9,7 +9,7 @@ const nodeUtil = require('node:util') class FormData { #state = [] - constructor (form) { + constructor (form = undefined) { webidl.util.markAsUncloneable(this) if (form !== undefined) { diff --git a/test/fetch/formdata.js b/test/fetch/formdata.js index 66d62a33f8c..97f91ca0b10 100644 --- a/test/fetch/formdata.js +++ b/test/fetch/formdata.js @@ -341,7 +341,7 @@ test('FormData should be compatible with third-party libraries', (t) => { }) test('arguments', () => { - assert.strictEqual(FormData.constructor.length, 1) + assert.strictEqual(FormData.length, 0) assert.strictEqual(FormData.prototype.append.length, 2) assert.strictEqual(FormData.prototype.delete.length, 1) assert.strictEqual(FormData.prototype.get.length, 1)