From 2888fa158d67c1419199f152326e12a05618b53e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 28 Aug 2026 17:30:31 +0100 Subject: Create objects without prototypes when used as map with arbitrary keys --- lib/docx/styles-reader.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/docx/styles-reader.js') 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); -- cgit v1.2.3