Skip to content

Commit

Permalink
3.2.1
Browse files Browse the repository at this point in the history
Fix options overloading for strict mode
  • Loading branch information
potch committed Oct 19, 2017
1 parent b912ac2 commit 14d576f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion browser/xmlom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6844,7 +6844,10 @@ function getParser(callback, error, options) {
var cur = new Node();
cur.root = true;

var parser = sax.parser(options.strict || true, options);
var parser = sax.parser(
'strict' in options ? options.strict : true,
options
);

parser.onerror = function (e) {
error(e);
Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ function getParser(callback, error, options) {
var cur = new Node();
cur.root = true;

var parser = sax.parser(options.strict || true, options);
var parser = sax.parser(
'strict' in options ? options.strict : true,
options
);

parser.onerror = function (e) {
error(e);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xmlom",
"version": "3.2.0",
"version": "3.2.1",
"description": "Tiny XML Object Model",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit 14d576f

Please sign in to comment.