From 8b7f93cc6919b5d561fe44e22b76baafa2b7c44b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 22 Dec 2014 06:45:29 -0500 Subject: [PATCH] fix(load) add arraybuffer check --- lib/client/load.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/client/load.js b/lib/client/load.js index 7723a28e..0ba9feac 100644 --- a/lib/client/load.js +++ b/lib/client/load.js @@ -164,6 +164,7 @@ var Util, DOM; p = params, countProgress, isObject = Util.type.object(p.data), isArray = Util.type.array(p.data), + isArrayBuf = Util.type(p.data) === 'arraybuffer', type = p.type || p.method || 'GET', xhr = new XMLHttpRequest(); @@ -172,7 +173,7 @@ var Util, DOM; if (p.responseType) xhr.responseType = p.responseType; - if (isObject || isArray) + if (!isArrayBuf && isObject || isArray) data = Util.json.stringify(p.data); else data = p.data;