mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 04:17:49 +00:00
Bump to v4.17.1.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
var apply = require('./_apply'),
|
||||
castPath = require('./_castPath'),
|
||||
isKey = require('./_isKey'),
|
||||
last = require('./last'),
|
||||
parent = require('./_parent'),
|
||||
toKey = require('./_toKey');
|
||||
@@ -16,12 +15,9 @@ var apply = require('./_apply'),
|
||||
* @returns {*} Returns the result of the invoked method.
|
||||
*/
|
||||
function baseInvoke(object, path, args) {
|
||||
if (!isKey(path, object)) {
|
||||
path = castPath(path);
|
||||
object = parent(object, path);
|
||||
path = last(path);
|
||||
}
|
||||
var func = object == null ? object : object[toKey(path)];
|
||||
path = castPath(path, object);
|
||||
object = parent(object, path);
|
||||
var func = object == null ? object : object[toKey(last(path))];
|
||||
return func == null ? undefined : apply(func, object, args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user