mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 04:08:34 +08:00
fix(components): upload headers add type judge (#4119)
This commit is contained in:
parent
c1bfe08c21
commit
4c698be458
@ -92,9 +92,11 @@ export default function upload(option: ElUploadRequestOptions) {
|
||||
}
|
||||
}
|
||||
|
||||
headers.forEach((value, key) => {
|
||||
xhr.setRequestHeader(key, value)
|
||||
})
|
||||
if (headers instanceof Headers) {
|
||||
headers.forEach((value, key) => {
|
||||
xhr.setRequestHeader(key, value)
|
||||
})
|
||||
}
|
||||
|
||||
xhr.send(formData)
|
||||
return xhr
|
||||
|
Loading…
Reference in New Issue
Block a user