Fix lazy sequence test fails.

This commit is contained in:
John-David Dalton
2016-12-08 22:28:27 -08:00
parent 5ee5099af1
commit b51786e72e

View File

@@ -1876,7 +1876,7 @@
resIndex = 0,
takeCount = nativeMin(length, this.__takeCount__);
if (!isArr || (arrLength == length && takeCount == length)) {
if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
return baseWrapperValue(array, this.__actions__);
}
var result = [];
@@ -16836,14 +16836,13 @@
// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
arrayEach(['drop', 'take'], function(methodName, index) {
LazyWrapper.prototype[methodName] = function(n) {
var filtered = this.__filtered__;
if (filtered && !index) {
return new LazyWrapper(this);
}
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
var result = this.clone();
if (filtered) {
var result = (this.__filtered__ && !index)
? new LazyWrapper(this)
: this.clone();
if (result.__filtered__) {
result.__takeCount__ = nativeMin(n, result.__takeCount__);
} else {
result.__views__.push({