mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Make isLaziable work with wrapped lodash methods.
This commit is contained in:
@@ -4278,7 +4278,15 @@
|
|||||||
*/
|
*/
|
||||||
function isLaziable(func) {
|
function isLaziable(func) {
|
||||||
var funcName = getFuncName(func);
|
var funcName = getFuncName(func);
|
||||||
return !!funcName && func === lodash[funcName] && funcName in LazyWrapper.prototype;
|
if (!(funcName in LazyWrapper.prototype)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var other = lodash[funcName];
|
||||||
|
if (func === other) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
var data = getData(other);
|
||||||
|
return !!data && func === data[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user