Tweak lazy _.pluck and _.where methods.

This commit is contained in:
John-David Dalton
2014-11-17 07:15:44 +01:00
parent 0d87b7d720
commit 7bab4817f2

View File

@@ -10195,10 +10195,10 @@
// Add `LazyWrapper` methods for `_.pluck` and `_.where`.
arrayEach(['pluck', 'where'], function (methodName, index) {
var operationName = index ? 'filter' : 'map',
getCallback = index ? matches : property;
createCallback = index ? matches : property;
LazyWrapper.prototype[methodName] = function(value) {
return this[operationName](getCallback(value));
return this[operationName](createCallback(value));
};
});