mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Fixin scope range for var declarations in internal version of hasPath.
This commit is contained in:
@@ -17,11 +17,12 @@ function hasPath(object, path, hasFunc) {
|
||||
path = castPath(path, object)
|
||||
|
||||
let index = -1
|
||||
let length = path.length
|
||||
let { length } = path
|
||||
let result = false
|
||||
let key
|
||||
|
||||
while (++index < length) {
|
||||
const key = toKey(path[index])
|
||||
key = toKey(path[index])
|
||||
if (!(result = object != null && hasFunc(object, key))) {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user