2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

fix: exception to sending formdata in webworker (#5139)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
wenzheng
2022-12-02 01:15:23 +08:00
committed by GitHub
parent 9041c7d272
commit e3d759491c
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ export default isXHRAdapterSupported && function (config) {
}
}
if (utils.isFormData(requestData) && platform.isStandardBrowserEnv) {
if (utils.isFormData(requestData) && (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv)) {
requestHeaders.setContentType(false); // Let the browser set it
}