From c225bc3f3dbe5c001e8fec119d8f8dadf96ec95b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jul 2016 19:57:37 +0100 Subject: Return root element directly when reading XML --- lib/docx/document-xml-reader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/docx/document-xml-reader.js') diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js index c241c70..12ca19e 100644 --- a/lib/docx/document-xml-reader.js +++ b/lib/docx/document-xml-reader.js @@ -7,8 +7,8 @@ var Result = require("../results").Result; function DocumentXmlReader(options) { var bodyReader = options.bodyReader; - function convertXmlToDocument(documentXml) { - var body = documentXml.root.first("w:body"); + function convertXmlToDocument(element) { + var body = element.first("w:body"); var result = bodyReader.readXmlElements(body.children) .map(function(children) { -- cgit v1.2.3