Skip to content

Commit

Permalink
fix: add default value for shemaPath param (mafintosh#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Kouzma committed Dec 18, 2017
1 parent 030467a commit 7bd6d1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++')
Expand Down

0 comments on commit 7bd6d1b

Please sign in to comment.