Add lazy _.compact test and cleanup previous fix.

This commit is contained in:
John-David Dalton
2014-11-21 01:33:38 -08:00
parent 1705bf4f3c
commit 5f7dcc9b78
2 changed files with 13 additions and 8 deletions

View File

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