Skip to content

Commit

Permalink
Merge pull request #65 from tu1ly/master
Browse files Browse the repository at this point in the history
fix of TypeError: Cannot read property '0' of undefined
  • Loading branch information
František Hába committed Jul 10, 2013
2 parents 91b5a22 + 02765e4 commit 16f3e3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engines/json/validateItems.js
Expand Up @@ -26,6 +26,11 @@ Validation.prototype.validateItems = function(instance, schema, path, callback)
* ...
* }
*/

if (isUndefined(instance)) {
instance = []
}

if (isArray(schema.items)) {

// Additional items are allowed
Expand Down

0 comments on commit 16f3e3f

Please sign in to comment.