diff --git a/lib/xml.js b/lib/xml.js index 01a5654..c02d845 100644 --- a/lib/xml.js +++ b/lib/xml.js @@ -178,6 +178,7 @@ function resolve(data, indent, indent_count) { } if (values.forEach) { + if (values.length === 0) break; isStringContent = false; content.push(''); values.forEach(function(value) {