From 014982cb2c4e75680bf30938695389406623d4c7 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 14 Nov 2016 17:32:52 -0800 Subject: [PATCH] Remove `isKey` use from `invokeMap`. --- lodash.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 8dde58d3b..7f3eef410 100644 --- a/lodash.js +++ b/lodash.js @@ -9476,12 +9476,10 @@ var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', - isProp = isKey(path), result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); - result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args); + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); }); return result; });