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/styles-reader.js | |
| parent | ba731d3c8a9408b9d33deb63e0492b54298169c5 (diff) | |
Return root element directly when reading XML
Diffstat (limited to 'lib/docx/styles-reader.js')
| -rw-r--r-- | lib/docx/styles-reader.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/docx/styles-reader.js b/lib/docx/styles-reader.js index 3419ac4..4462cf0 100644 --- a/lib/docx/styles-reader.js +++ b/lib/docx/styles-reader.js @@ -13,7 +13,7 @@ function Styles(paragraphStyles, characterStyles) { }; } -function readStylesXml(xml) { +function readStylesXml(root) { var paragraphStyles = {}; var characterStyles = {}; @@ -22,7 +22,7 @@ function readStylesXml(xml) { "character": characterStyles }; - xml.root.getElementsByTagName("w:style").forEach(function(styleElement) { + root.getElementsByTagName("w:style").forEach(function(styleElement) { var style = readStyleElement(styleElement); var styleSet = styles[style.type]; if (styleSet) { |
