Skip to content

Commit 26d1bf0

Browse files
committed
fix[Mock]: fixed mock bug
1 parent b94e69b commit 26d1bf0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mock/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ export function mockXHR() {
1111
Mock.XHR.prototype.send = function() {
1212
if (this.custom.xhr) {
1313
this.custom.xhr.withCredentials = this.withCredentials || false
14-
this.custom.xhr.responseType = this.responseType
14+
15+
if (this.responseType) {
16+
this.custom.xhr.responseType = this.responseType
17+
}
1518
}
1619
this.proxy_send(...arguments)
1720
}

0 commit comments

Comments
 (0)