From 53f1820d099837281b9e0a76c6c065f44de0ba5d Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 1 Apr 2019 17:38:44 +0800 Subject: [PATCH] fix[Mock]: fixed mock bug --- src/mock/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mock/index.js b/src/mock/index.js index a6ab5f14..c21d4e4b 100644 --- a/src/mock/index.js +++ b/src/mock/index.js @@ -11,7 +11,9 @@ Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send 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) }