Make isLaziable work with wrapped lodash methods.

This commit is contained in:
jdalton
2015-05-23 20:12:20 -07:00
parent 6c8988ab69
commit 1b8f2c2adb

View File

@@ -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];
}
/**