Skip to content

Commit

Permalink
Don't initialize options uselessly
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsup committed Jun 17, 2018
1 parent 83eb8eb commit 8eefd0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -132,7 +132,7 @@ internals.root = function () {
return any.validate(value, callback);
}

const options = count === 2 ? args[1] : {};
const options = count === 2 ? args[1] : undefined;
const schema = root.compile(args[0]);

return schema._validateWithOptions(value, options, callback);
Expand Down

0 comments on commit 8eefd0d

Please sign in to comment.