fix(load) add arraybuffer check

This commit is contained in:
coderaiser 2014-12-22 06:45:29 -05:00
parent 68a34f6224
commit 8b7f93cc69

View file

@ -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;