From aa590afad9dffc798a7ad07b3d724c6b86a64b9a Mon Sep 17 00:00:00 2001 From: Pimi <1019242875@qq.com> Date: Fri, 7 Jul 2017 18:09:44 +0800 Subject: [PATCH] Avert stringify result when result is string yet --- src/http/client/jsonp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/client/jsonp.js b/src/http/client/jsonp.js index 241e7b40..c2e2d04e 100644 --- a/src/http/client/jsonp.js +++ b/src/http/client/jsonp.js @@ -28,7 +28,7 @@ export default function (request) { }; window[callback] = result => { - body = JSON.stringify(result); + body = typeof result === 'string' ? result : JSON.stringify(result); }; request.abort = () => {