Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tsctx
Copy link
Member

@tsctx tsctx commented Aug 13, 2025

The FormData constructor's arguments are all marked as optional in the specification, so let's make them optional.


test('arguments', () => {
assert.strictEqual(FormData.constructor.length, 1)
assert.strictEqual(FormData.prototype.constructor.length, 0)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Node.js v24.5.0.
Type ".help" for more information.
> `${FormData.constructor}`
'function Function() { [native code] }'

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't match other implementations

@tsctx
Copy link
Member Author

tsctx commented Aug 13, 2025

I'm not sure what "other implementations" you're referring to, but browsers (Chrome, Firefox) also have a length of 0, just like this one.

@KhafraDev KhafraDev merged commit c399fdf into main Aug 13, 2025
33 checks passed
@tsctx tsctx deleted the fix-formdata-constructor-args-length branch August 13, 2025 15:50
@github-actions github-actions bot mentioned this pull request Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants