diff --git a/index.js b/index.js index b80ba95..25f5abd 100644 --- a/index.js +++ b/index.js @@ -151,6 +151,10 @@ var compile = function(schema, cache, root, reporter, opts) { tuple = true } + if(!Array.isArray(schemaPath)) { + schemaPath = []; + } + var indent = 0 var error = function(msg, prop, value) { validate('errors++')