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/relationships-reader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/docx/relationships-reader.js') diff --git a/lib/docx/relationships-reader.js b/lib/docx/relationships-reader.js index 5f54f42..a3df9a9 100644 --- a/lib/docx/relationships-reader.js +++ b/lib/docx/relationships-reader.js @@ -19,12 +19,12 @@ function readRelationships(element) { } function Relationships(relationships) { - var targetsByRelationshipId = {}; + var targetsByRelationshipId = Object.create(null); relationships.forEach(function(relationship) { targetsByRelationshipId[relationship.relationshipId] = relationship.target; }); - var targetsByType = {}; + var targetsByType = Object.create(null); relationships.forEach(function(relationship) { if (!targetsByType[relationship.type]) { targetsByType[relationship.type] = []; -- cgit v1.2.3