mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Remove argument unrolling in LazyWrapper assignments.
This commit is contained in:
@@ -11670,16 +11670,13 @@
|
|||||||
retUnwrapped = /^(?:first|last)$/.test(methodName);
|
retUnwrapped = /^(?:first|last)$/.test(methodName);
|
||||||
|
|
||||||
lodash.prototype[methodName] = function() {
|
lodash.prototype[methodName] = function() {
|
||||||
var length = arguments.length,
|
var args = arguments,
|
||||||
args = Array(length),
|
length = args.length,
|
||||||
chainAll = this.__chain__,
|
chainAll = this.__chain__,
|
||||||
value = this.__wrapped__,
|
value = this.__wrapped__,
|
||||||
isHybrid = !!this.__actions__.length,
|
isHybrid = !!this.__actions__.length,
|
||||||
isLazy = value instanceof LazyWrapper;
|
isLazy = value instanceof LazyWrapper;
|
||||||
|
|
||||||
while (length--) {
|
|
||||||
args[length] = arguments[length];
|
|
||||||
}
|
|
||||||
if (isLazy && checkIteratee) {
|
if (isLazy && checkIteratee) {
|
||||||
// avoid lazy use if the iteratee has a `length` other than `1`
|
// avoid lazy use if the iteratee has a `length` other than `1`
|
||||||
var iteratee = args[0];
|
var iteratee = args[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user