Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 3e6868b

Browse files
committed
Merge pull request #88 from danielb2/master
fix issue where if no options are passed, defaults are not set
2 parents 190315d + ac26bd3 commit 3e6868b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/xml2json.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ function coerce(value,key) {
129129
* of the XML.
130130
*/
131131
module.exports = function(xml, _options) {
132+
133+
_options = _options || {};
132134
var parser = new expat.Parser('UTF-8');
133135

134136
parser.on('startElement', startElement);

0 commit comments

Comments
 (0)