mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Store last(path) in a var.
This commit is contained in:
@@ -9527,7 +9527,8 @@
|
||||
if (!result && !isKey(path)) {
|
||||
path = toPath(path);
|
||||
object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||||
result = object != null && hasOwnProperty.call(object, last(path));
|
||||
path = last(path);
|
||||
result = object != null && hasOwnProperty.call(object, path);
|
||||
}
|
||||
return result || (lodash.support.nonEnumStrings && isString(object) && isIndex(path, object.length));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user