Skip to content
Browse files

fix of TypeError: Cannot read property '0' of undefined

  • Loading branch information...
1 parent 91b5a22 commit 02765e4c6052415253ca3aec9d53e76828c20b73 @tu1ly tu1ly committed
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 02765e4

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