diff --git a/mock/index.js b/mock/index.js index 15e07afaad88b8859a8783a5c3d94b7c76674e46..7d9609ab5642081fddda59ffb428e429f62591cf 100644 --- a/mock/index.js +++ b/mock/index.js @@ -11,7 +11,10 @@ export function mockXHR() { Mock.XHR.prototype.send = function() { if (this.custom.xhr) { this.custom.xhr.withCredentials = this.withCredentials || false - this.custom.xhr.responseType = this.responseType + + if (this.responseType) { + this.custom.xhr.responseType = this.responseType + } } this.proxy_send(...arguments) }