Fix the underscore build of _.memoize.

This commit is contained in:
John-David Dalton
2014-01-11 23:54:55 -08:00
parent 66e7cd41b7
commit b14c05ccae
2 changed files with 9 additions and 9 deletions

View File

@@ -3396,7 +3396,7 @@
function memoize(func, resolver) {
var cache = {};
return function() {
var key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0];
var key = resolver ? resolver.apply(this, arguments) : '_' + arguments[0];
return hasOwnProperty.call(cache, key)
? cache[key]
: (cache[key] = func.apply(this, arguments));