-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
Description
When using chaining with takeWhile and last return undefined instead of the correct value.
example:
_
.chain([1, 2, 3])
.takeWhile(function(item) {
return item < 3
})
.last()
.value()
// ==> undefined
making the same thing without chaining works correctly
_.last(
_.takeWhile([1, 2, 3], function(item) {
return item < 3
})
)
// ==> 2
maybe some issue with lazy evaluation?
I created a jsfiddle from this issue with the latest lodash (3.3.0)
http://jsfiddle.net/zyx2rkfa/