Comparing version 0.5.1 to 0.5.2
@@ -225,3 +225,5 @@ "use strict"; | ||
source.forEach((s, k) => { | ||
_iterate(s, definition[0], current + `[${k}]`, null); | ||
if (definition[0]) { | ||
_iterate(s, definition[0], current + `[${k}]`, null); | ||
} | ||
}); | ||
@@ -228,0 +230,0 @@ } |
{ | ||
"name": "typetree", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Object validation using a type tree definition.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -104,2 +104,5 @@ "use strict"; | ||
errors = validateObject(validObject, [{}]); | ||
assert.isUndefined(errors); | ||
errors = validateObject(validObject, 1); | ||
@@ -106,0 +109,0 @@ assert.lengthOf(errors, 1); |
19290
480