aboutsummaryrefslogtreecommitdiff
path: root/lib/docx/relationships-reader.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-07-03 19:57:37 +0100
committerMichael Williamson <mike@zwobble.org>2016-07-03 19:57:37 +0100
commitc225bc3f3dbe5c001e8fec119d8f8dadf96ec95b (patch)
tree22e6da4fb93dae0cdbfa99cb6a6a508116a1b5ee /lib/docx/relationships-reader.js
parentba731d3c8a9408b9d33deb63e0492b54298169c5 (diff)
Return root element directly when reading XML
Diffstat (limited to 'lib/docx/relationships-reader.js')
-rw-r--r--lib/docx/relationships-reader.js4
1 files changed, 2 insertions, 2 deletions
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