Skip to content

Commit

Permalink
fix Keys validator working null
Browse files Browse the repository at this point in the history
  • Loading branch information
uNmAnNeR committed Nov 5, 2019
1 parent 00eb665 commit 3ee4832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operators/Keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Keys (vMap: { [string]: MixedValidator }): Validator {
// make keys required by default
if (!isValueAccessor(validator)) validator = Required(validator);

const res = validator(coll[k], k, coll, ...args);
const res = validator(coll && coll[k], k, coll, ...args);
if (res instanceof Error) {
if (!errors) errors = {};
errors[k] = ValidationError.extractData(res);
Expand Down

0 comments on commit 3ee4832

Please sign in to comment.