Skip to content

Commit

Permalink
default schemaPath in visit anyOf or oneOf
Browse files Browse the repository at this point in the history
  • Loading branch information
shalevshalit committed Dec 18, 2017
1 parent 030467a commit b5f46cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -413,7 +413,7 @@ var compile = function(schema, cache, root, reporter, opts) {
validate('if (errors !== %s) {', prev)
('errors = %s', prev)
}
visit(name, sch, false, false)
visit(name, sch, false, false, schemaPath)
})
node.anyOf.forEach(function(sch, i) {
if (i) validate('}')
Expand All @@ -432,7 +432,7 @@ var compile = function(schema, cache, root, reporter, opts) {
('var %s = 0', passes)

node.oneOf.forEach(function(sch, i) {
visit(name, sch, false, false)
visit(name, sch, false, false, schemaPath)
validate('if (%s === errors) {', prev)
('%s++', passes)
('} else {')
Expand Down

0 comments on commit b5f46cd

Please sign in to comment.