From ecd831f490904aff56f3718913b517db9850e9fb Mon Sep 17 00:00:00 2001 From: shuiqin Date: Wed, 19 Dec 2018 16:48:43 +0800 Subject: [PATCH] hotfix151 --- src/mock/xhr/xhr.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mock/xhr/xhr.js b/src/mock/xhr/xhr.js index daf2af4b..287bbf05 100644 --- a/src/mock/xhr/xhr.js +++ b/src/mock/xhr/xhr.js @@ -289,8 +289,10 @@ Util.extend(MockXMLHttpRequest.prototype, { that.statusText = HTTP_STATUS_CODES[200] // fix #92 #93 by @qddegtya - that.response = that.responseText = JSON.stringify( - convert(that.custom.template, that.custom.options), + // fix #151 by @shuiqin + that.response = convert(that.custom.template, that.custom.options) + that.responseText = JSON.stringify( + that.response, null, 4 )