@@ -102,12 +102,12 @@ class exports.Parser extends events
102
102
charkey = @options .charkey
103
103
104
104
@saxParser .onopentag = (node ) =>
105
- obj = Object . create ( null )
105
+ obj = {}
106
106
obj[charkey] = " "
107
107
unless @options .ignoreAttrs
108
108
for own key of node .attributes
109
109
if attrkey not of obj and not @options .mergeAttrs
110
- obj[attrkey] = Object . create ( null )
110
+ obj[attrkey] = {}
111
111
newValue = if @options .attrValueProcessors then processItem (@options .attrValueProcessors , node .attributes [key], key) else node .attributes [key]
112
112
processedKey = if @options .attrNameProcessors then processItem (@options .attrNameProcessors , key) else key
113
113
if @options .mergeAttrs
@@ -163,7 +163,7 @@ class exports.Parser extends events
163
163
# put children into <childkey> property and unfold chars if necessary
164
164
if @options .explicitChildren and not @options .mergeAttrs and typeof obj is ' object'
165
165
if not @options .preserveChildrenOrder
166
- node = Object . create ( null )
166
+ node = {}
167
167
# separate attributes
168
168
if @options .attrkey of obj
169
169
node[@options .attrkey ] = obj[@options .attrkey ]
@@ -181,7 +181,7 @@ class exports.Parser extends events
181
181
# append current node onto parent's <childKey> array
182
182
s[@options .childkey ] = s[@options .childkey ] or []
183
183
# push a clone so that the node in the children array can receive the #name property while the original obj can do without it
184
- objClone = Object . create ( null )
184
+ objClone = {}
185
185
for own key of obj
186
186
objClone[key] = obj[key]
187
187
s[@options .childkey ].push objClone
@@ -198,7 +198,7 @@ class exports.Parser extends events
198
198
if @options .explicitRoot
199
199
# avoid circular references
200
200
old = obj
201
- obj = Object . create ( null )
201
+ obj = {}
202
202
obj[nodeName] = old
203
203
204
204
@resultObject = obj
0 commit comments