Skip to content
Browse files

Merge pull request #65 from tu1ly/master

fix of TypeError: Cannot read property '0' of undefined
  • Loading branch information...
2 parents 91b5a22 + 02765e4 commit 16f3e3f5923be4a70c34280f57dfe3d20c5b01d5 @Baggz committed Jul 10, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/engines/json/validateItems.js
View
5 src/engines/json/validateItems.js
@@ -26,6 +26,11 @@ Validation.prototype.validateItems = function(instance, schema, path, callback)
* ...
* }
*/
+
+ if (isUndefined(instance)) {
+ instance = []
+ }
+
if (isArray(schema.items)) {
// Additional items are allowed

0 comments on commit 16f3e3f

Please sign in to comment.
Something went wrong with that request. Please try again.