Fix lazy methods to execute non-lazy methods performed in between.

This commit is contained in:
Filip Zawada
2014-11-20 14:59:45 +01:00
committed by John-David Dalton
parent 7cf40576dd
commit 8612946bf5
2 changed files with 11 additions and 1 deletions

View File

@@ -10266,7 +10266,7 @@
: lodash[methodName](this.value());
}
if (isLazy || isArray(value)) {
var result = func.apply(isLazy ? value : new LazyWrapper(this), args);
var result = func.apply(isLazy && !this.__queue__.length ? value : new LazyWrapper(this), args);
return new LodashWrapper(result, chainAll);
}
return this.thru(function(value) {