mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Move toKey from baseProperty to property.
This commit is contained in:
@@ -3311,7 +3311,6 @@
|
|||||||
* @returns {Function} Returns the new function.
|
* @returns {Function} Returns the new function.
|
||||||
*/
|
*/
|
||||||
function baseProperty(key) {
|
function baseProperty(key) {
|
||||||
key = toKey(key);
|
|
||||||
return function(object) {
|
return function(object) {
|
||||||
return object == null ? undefined : object[key];
|
return object == null ? undefined : object[key];
|
||||||
};
|
};
|
||||||
@@ -15007,7 +15006,7 @@
|
|||||||
* // => [1, 2]
|
* // => [1, 2]
|
||||||
*/
|
*/
|
||||||
function property(path) {
|
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