diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-08-28 17:30:31 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-08-28 17:30:31 +0100 |
| commit | 2888fa158d67c1419199f152326e12a05618b53e (patch) | |
| tree | c239ed44678ba87f29ff9b84625cf1a0ba48a68a /lib/docx/styles-reader.js | |
| parent | 31f0c370be4b95ac4fa285fea3be970606735f16 (diff) | |
Create objects without prototypes when used as map with arbitrary keys
Diffstat (limited to 'lib/docx/styles-reader.js')
| -rw-r--r-- | lib/docx/styles-reader.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/docx/styles-reader.js b/lib/docx/styles-reader.js index 276a668..1daa5e9 100644 --- a/lib/docx/styles-reader.js +++ b/lib/docx/styles-reader.js @@ -22,10 +22,10 @@ function Styles(paragraphStyles, characterStyles, tableStyles, numberingStyles) Styles.EMPTY = new Styles({}, {}, {}, {}); function readStylesXml(root) { - var paragraphStyles = {}; - var characterStyles = {}; - var tableStyles = {}; - var numberingStyles = {}; + var paragraphStyles = Object.create(null); + var characterStyles = Object.create(null); + var tableStyles = Object.create(null); + var numberingStyles = Object.create(null); root.getElementsByTagName("w:style").forEach(function(styleElement) { var style = readStyleElement(styleElement); |
