mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Reduce lazy wrapper for lazy first and last.
This commit is contained in:
@@ -10095,12 +10095,9 @@
|
||||
isLazy = value instanceof LazyWrapper;
|
||||
|
||||
if (retUnwrapped && !chainAll) {
|
||||
if (isLazy) {
|
||||
return func.apply(value, args);
|
||||
}
|
||||
var otherArgs = [this.value()];
|
||||
push.apply(otherArgs, args);
|
||||
return lodash[methodName].apply(lodash, otherArgs);
|
||||
return isLazy
|
||||
? func.call(value)
|
||||
: lodash[methodName](this.value());
|
||||
}
|
||||
if (isLazy || isArray(value)) {
|
||||
var result = func.apply(isLazy ? value : new LazyWrapper(this), args);
|
||||
|
||||
Reference in New Issue
Block a user