Skip to content

Commit 351c1d1

Browse files
authored
fix: cover merge (#212)
1 parent bac49af commit 351c1d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lin/plugins/axios.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ _axios.interceptors.request.use((originConfig) => {
6464
let hasFile = false
6565
Object.keys(reqConfig.data).forEach((key) => {
6666
if (typeof reqConfig.data[key] === 'object') {
67-
let item = reqConfig.data[key]
67+
const item = reqConfig.data[key]
6868
if (item instanceof FileList || item instanceof File || item instanceof Blob) {
6969
hasFile = true
70-
} else if (reqConfig.data[key].constructor === Object) {
70+
} else if (Object.prototype.toString.call(item) === '[object Object]') {
7171
reqConfig.data[key] = JSON.stringify(reqConfig.data[key])
7272
}
7373
}

0 commit comments

Comments
 (0)