mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
Make isLaziable work with wrapped lodash methods.
This commit is contained in:
@@ -4278,7 +4278,15 @@
|
||||
*/
|
||||
function isLaziable(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