Skip to content

Commit

Permalink
Merge pull request #151 from shalevshalit/master
Browse files Browse the repository at this point in the history
default schemaPath in visit anyOf or oneOf
  • Loading branch information
LinusU authored Dec 18, 2017
2 parents 030467a + 8621356 commit ee8f26a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
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 ee8f26a

Please sign in to comment.