We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7c8242 commit 6671676Copy full SHA for 6671676
src/xml2json.js
@@ -116,7 +116,7 @@
116
}
117
118
var root = {};
119
- if (typeof xml.attributes === 'undefined') {
+ if (typeof xml.attributes === 'undefined' || xml.attributes === null) {
120
root[xml.nodeName] = xml2jsonImpl(xml, options);
121
} else if (xml.attributes.length === 0 && xml.childElementCount === 0){
122
root[xml.nodeName] = normalize(xml.textContent, options);
0 commit comments