Skip to content

Commit

Permalink
修复 ie11 不兼容问题
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed May 3, 2018
1 parent d95cc06 commit 2695c28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/json2xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ var process_to_xml = function (node_data, options) {
for (var name in node_data) {
if (node_data[name] instanceof Array) {
for (var j = 0; j < node_data[name].length; j++) {
nodes.push(makeNode(name, fn(node_data[name][j], 0, level + 1), null, level + 1, objKeys(node_data[name][j]).length));
if (node_data[name].hasOwnProperty(j)) {
nodes.push(makeNode(name, fn(node_data[name][j], 0, level + 1), null, level + 1, objKeys(node_data[name][j]).length));
}
}
} else {
nodes.push(makeNode(name, fn(node_data[name], 0, level + 1), null, level + 1));
Expand Down

0 comments on commit 2695c28

Please sign in to comment.