Skip to content

Commit

Permalink
remove unused code from verifier object
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaksandr-master committed Dec 31, 2014
1 parent e6a8807 commit 74b8555
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,25 +318,18 @@ SchemaVerifier.prototype = {
if (schema.isRequired) {
validations.unshift('required');
} else {
validations = [{
validations = {
any: [ 'type undefined', validations ]
}];
};
}

if (validations.length) {
this.verifierObject = new Verifier(validations);
}
this.verifierObject = new Verifier(validations);
});
},

_verifySchema: function (schema, value, path, done) {
var that = this;

if (!schema.verifierObject) {
done();
return;
}

done = this._wrapDone(done, value, path);

schema.verifierObject.verify(value, function (err) {
Expand Down

0 comments on commit 74b8555

Please sign in to comment.