mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
bug fix for _.memoize when key is derived from prototype
This commit is contained in:
@@ -426,7 +426,7 @@
|
||||
hasher = hasher || _.identity;
|
||||
return function() {
|
||||
var key = hasher.apply(this, arguments);
|
||||
return key in memo ? memo[key] : (memo[key] = func.apply(this, arguments));
|
||||
return hasOwnProperty.call(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user