mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
Move toKey from baseProperty to property.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user