mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Ensure _.has returns false for nullish objects. [closes #2190]
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user