Ensure _.has returns false for nullish objects. [closes #2190]

This commit is contained in:
John-David Dalton
2016-03-31 15:55:05 -07:00
parent e96ee69f1c
commit 8bd9a4d2c3
2 changed files with 22 additions and 3 deletions

View File

@@ -5353,9 +5353,9 @@
var index = -1,
length = path.length;
while (object != null && ++index < length) {
while (++index < length) {
var key = path[index];
if (!(result = hasFunc(object, key))) {
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];