Fix JSON encoding to be fully XE-compatible

This commit is contained in:
Kijin Sung 2016-02-26 14:58:42 +09:00
parent 93ca2acdc8
commit 379bed000d
2 changed files with 28 additions and 15 deletions

View file

@ -69,11 +69,7 @@
var result = {};
$.each(data, function(key, val) {
if ($.inArray(key, ["error", "message", "act", "redirect_url"]) >= 0 || $.inArray(key, return_fields) >= 0) {
if ($.isArray(val)) {
result[key] = { item: val };
} else {
result[key] = val;
}
result[key] = val;
}
});