Skip to content

Commit 9ffe90d

Browse files
authored
fix(fetch): Explicitly check for FormData type (nodejs#1451)
1 parent d13ffb5 commit 9ffe90d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/fetch/body.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function extractBody (object, keepalive = false) {
7171

7272
// Set source to a copy of the bytes held by object.
7373
source = new Uint8Array(object)
74-
} else if (util.isFormDataLike(object)) {
74+
} else if (object instanceof FormData || util.isFormDataLike(object)) {
7575
const boundary = '----formdata-undici-' + Math.random()
7676
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
7777

0 commit comments

Comments
 (0)