summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-02-09 20:38:05 +0000
committerMichael Williamson <mike@zwobble.org>2015-02-09 20:38:05 +0000
commit947a1ccf23c9a490e194ff6df86051bccdb3c9b2 (patch)
tree72a1228cca697fb7c82512b248fa5930a40780fd
parenta6233fafe736ff9abbdfe88f7f702ebd63ee4608 (diff)
Don't parse non-existent children
-rw-r--r--lib/docx/document-xml-reader.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js
index 7a0dd8a..1d43534 100644
--- a/lib/docx/document-xml-reader.js
+++ b/lib/docx/document-xml-reader.js
@@ -203,9 +203,7 @@ function DocumentXmlReader(options) {
if (name === "_GoBack") {
return new Result([]);
} else {
- return readXmlElements(element.children).map(function(){
- return new documents.BookmarkStart({name: name});
- });
+ return new Result(new documents.BookmarkStart({name: name}));
}
},