Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
style fix
  • Loading branch information
epoberezkin committed Feb 9, 2019
1 parent fdfbd44 commit 33d1ac4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Expand Up @@ -5,7 +5,7 @@ env:
rules:
block-scoped-var: 2
callback-return: 2
complexity: [2, 16]
complexity: [2, 18]
curly: [2, multi-or-nest, consistent]
dot-location: [2, property]
dot-notation: 2
Expand Down
5 changes: 2 additions & 3 deletions lib/compile/index.js
Expand Up @@ -258,10 +258,9 @@ function compile(schema, root, localRefs, baseId) {
if (self._opts.validateSchema !== false) {
var deps = rule.definition.dependencies;
if (deps && !deps.every(function(keyword) {
return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
})) {
return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
}))
throw new Error('parent schema must have all required keywords: ' + deps.join(','));
}

var validateSchema = rule.definition.validateSchema;
if (validateSchema) {
Expand Down

0 comments on commit 33d1ac4

Please sign in to comment.