mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Remove isKey use from invokeMap.
This commit is contained in:
@@ -9476,12 +9476,10 @@
|
|||||||
var invokeMap = baseRest(function(collection, path, args) {
|
var invokeMap = baseRest(function(collection, path, args) {
|
||||||
var index = -1,
|
var index = -1,
|
||||||
isFunc = typeof path == 'function',
|
isFunc = typeof path == 'function',
|
||||||
isProp = isKey(path),
|
|
||||||
result = isArrayLike(collection) ? Array(collection.length) : [];
|
result = isArrayLike(collection) ? Array(collection.length) : [];
|
||||||
|
|
||||||
baseEach(collection, function(value) {
|
baseEach(collection, function(value) {
|
||||||
var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
|
result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
||||||
result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);
|
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user