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/relationships-reader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/docx/relationships-reader.js') diff --git a/lib/docx/relationships-reader.js b/lib/docx/relationships-reader.js index 7747bda..93fc618 100644 --- a/lib/docx/relationships-reader.js +++ b/lib/docx/relationships-reader.js @@ -1,9 +1,9 @@ exports.readRelationships = readRelationships; -function readRelationships(relationshipsXml) { +function readRelationships(element) { var relationships = {}; - relationshipsXml.root.children.forEach(function(child) { + element.children.forEach(function(child) { if (child.name === "{http://schemas.openxmlformats.org/package/2006/relationships}Relationship") { relationships[child.attributes.Id] = { target: child.attributes.Target -- cgit v1.2.3