Skip to content

Commit

Permalink
Pass options to constructor if not used with new
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovyerus committed Oct 19, 2019
1 parent 80c8f74 commit 4bde68e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/form_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ util.inherits(FormData, CombinedStream);
*/
function FormData(options) {
if (!(this instanceof FormData)) {
return new FormData();
return new FormData(options);
}

this._overheadLength = 0;
Expand Down

0 comments on commit 4bde68e

Please sign in to comment.