mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Move getData function guard to `isLaziable.
This commit is contained in:
committed by
John-David Dalton
parent
a2dd7171a5
commit
816f37bdc5
@@ -3998,7 +3998,7 @@
|
||||
* @returns {*} Returns the metadata for `func`.
|
||||
*/
|
||||
var getData = !metaMap ? noop : function(func) {
|
||||
return typeof func == 'function' ? metaMap.get(func) : undefined;
|
||||
return metaMap.get(func);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -4280,11 +4280,12 @@
|
||||
* @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
|
||||
*/
|
||||
function isLaziable(func) {
|
||||
var funcName = getFuncName(func);
|
||||
if (!(funcName in LazyWrapper.prototype)) {
|
||||
var funcName = getFuncName(func),
|
||||
other = lodash[funcName];
|
||||
|
||||
if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
|
||||
return false;
|
||||
}
|
||||
var other = lodash[funcName];
|
||||
if (func === other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user