fix(load) ajax: if data is array - nothing working out

This commit is contained in:
coderaiser 2014-06-17 04:01:27 -04:00
parent 8a2006b8a2
commit 6b11242c53

View file

@ -160,6 +160,7 @@ var Util, DOM;
var data,
p = params, countProgress,
isObject = Util.isObject(p.data),
isArray = Util.isArray(p.data),
type = p.type || p.method || 'GET',
xhr = new XMLHttpRequest();
@ -168,7 +169,7 @@ var Util, DOM;
if (p.responseType)
xhr.responseType = p.responseType;
if (isObject)
if (isObject || isArray)
data = Util.stringifyJSON(p.data);
else
data = p.data;