Skip to content

Commit

Permalink
fix(fetch): fix formData function
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Sep 7, 2022
1 parent 7bcd42e commit 53753bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/weak-dodos-cover.md
@@ -0,0 +1,5 @@
---
'@whatwg-node/fetch': patch
---

fix(fetch): fix formData function
2 changes: 1 addition & 1 deletion packages/fetch/dist/getFormDataMethod.js
Expand Up @@ -58,7 +58,7 @@ module.exports = function getFormDataMethod(File, limits) {
reject(new Error(`Fields limit exceeded: ${limits.fields}`));
})
bb.on('file', (name, fileStream, { filename, mimeType }) => {
if (limits.fieldsFirst) {
if (limits && limits.fieldsFirst) {
resolve(formData);
const fakeFileObj = {
name: filename,
Expand Down

0 comments on commit 53753bb

Please sign in to comment.