Skip to content

Commit f389133

Browse files
committed
Fix: Attributes are no longer arrays when mergeAttrs:true Fixes Leonidas-from-XIV#304
1 parent 129ebba commit f389133

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/xml2js.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/xml2js.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class exports.Parser extends events.EventEmitter
283283
newValue = if @options.attrValueProcessors then processName(@options.attrValueProcessors, node.attributes[key]) else node.attributes[key]
284284
processedKey = if @options.attrNameProcessors then processName(@options.attrNameProcessors, key) else key
285285
if @options.mergeAttrs
286-
@assignOrPush obj, processedKey, newValue
286+
obj[processedKey] = newValue
287287
else
288288
obj[attrkey][processedKey] = newValue
289289

0 commit comments

Comments
 (0)