diff --git a/index.js b/index.js index b80ba95..1ec896d 100644 --- a/index.js +++ b/index.js @@ -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('}') @@ -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 {')