Skip to content

Commit

Permalink
Making containsUndefined check for own properties
Browse files Browse the repository at this point in the history
  • Loading branch information
shimeez committed Sep 30, 2016
1 parent 9d67985 commit f087624
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ export function containsUndefined(mixed) {
}
} else if(isObject(mixed)) {
for(const key in mixed) {
if(argContainsUndefined) break;
argContainsUndefined = this.containsUndefined(mixed[key]);
if (mixed.hasOwnProperty(key)) {
if(argContainsUndefined) break;
argContainsUndefined = this.containsUndefined(mixed[key]);
}
}
} else {
argContainsUndefined = isUndefined(mixed);
Expand Down

0 comments on commit f087624

Please sign in to comment.