Skip to content

Commit

Permalink
fix object validation (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaareloun authored and mikeerickson committed Aug 31, 2019
1 parent 5c8b10e commit 2a803be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Validator.prototype = {
}

for (var i = 0, l = keys.length; i < l; i++) {
if (Object.hasOwnProperty.call(copy, keys[i])) {
if (typeof copy === 'object' && copy !== null && Object.hasOwnProperty.call(copy, keys[i])) {
copy = copy[keys[i]];
} else {
return;
Expand Down

0 comments on commit 2a803be

Please sign in to comment.