From fc48518f2bb577035d8f485e9788a25a462b0761 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 20 Apr 2016 18:12:16 -0700 Subject: [PATCH] Move `toKey` from `baseProperty` to `property`. --- lodash.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index 230d05ff0..640890f5f 100644 --- a/lodash.js +++ b/lodash.js @@ -3311,7 +3311,6 @@ * @returns {Function} Returns the new function. */ function baseProperty(key) { - key = toKey(key); return function(object) { return object == null ? undefined : object[key]; }; @@ -15007,7 +15006,7 @@ * // => [1, 2] */ function property(path) { - return isKey(path) ? baseProperty(path) : basePropertyDeep(path); + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } /**