From 6b11242c53ea59d33526d40c0f98a28f58bc748b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 17 Jun 2014 04:01:27 -0400 Subject: [PATCH] fix(load) ajax: if data is array - nothing working out --- 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 1d3378d0..4820bde8 100644 --- a/lib/client/load.js +++ b/lib/client/load.js @@ -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;