Skip to content

Commit 9eda218

Browse files
Cleaning up File support
1 parent 5eecebe commit 9eda218

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function objectToFormData (obj, fd, pre) {
4242
})
4343
} else if (isDate(obj)) {
4444
fd.append(pre, obj.toISOString())
45-
} else if (isObject(obj) && !isDate(obj) && !isFile(obj)) {
45+
} else if (isObject(obj) && !isDate(obj) && !isFile(obj) && !isBlob(obj)) {
4646
Object.keys(obj).forEach(function (prop) {
4747
var value = obj[prop]
4848

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ test('Date', t => {
303303
})
304304

305305
test('File', t => {
306-
const foo = new File([], {})
306+
const foo = new File([], '')
307307
const formData = objectToFormData({
308308
foo
309309
})

0 commit comments

Comments
 (0)