diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-07-03 19:57:37 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-07-03 19:57:37 +0100 |
| commit | c225bc3f3dbe5c001e8fec119d8f8dadf96ec95b (patch) | |
| tree | 22e6da4fb93dae0cdbfa99cb6a6a508116a1b5ee /lib/docx/content-types-reader.js | |
| parent | ba731d3c8a9408b9d33deb63e0492b54298169c5 (diff) | |
Return root element directly when reading XML
Diffstat (limited to 'lib/docx/content-types-reader.js')
| -rw-r--r-- | lib/docx/content-types-reader.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/docx/content-types-reader.js b/lib/docx/content-types-reader.js index 5364b87..8233119 100644 --- a/lib/docx/content-types-reader.js +++ b/lib/docx/content-types-reader.js @@ -13,11 +13,11 @@ var fallbackContentTypes = { exports.defaultContentTypes = contentTypes({}, {}); -function readContentTypesFromXml(xml) { +function readContentTypesFromXml(element) { var extensionDefaults = {}; var overrides = {}; - xml.root.children.forEach(function(child) { + element.children.forEach(function(child) { if (child.name === "content-types:Default") { extensionDefaults[child.attributes.Extension] = child.attributes.ContentType; } |
