mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Optimize createPartialWrapper.
This commit is contained in:
@@ -4161,8 +4161,6 @@
|
||||
Ctor = createCtorWrapper(func);
|
||||
|
||||
function wrapper() {
|
||||
// Avoid `arguments` object use disqualifying optimizations by
|
||||
// converting it to an array before providing it `func`.
|
||||
var argsIndex = -1,
|
||||
argsLength = arguments.length,
|
||||
leftIndex = -1,
|
||||
@@ -4176,7 +4174,7 @@
|
||||
args[leftIndex++] = arguments[++argsIndex];
|
||||
}
|
||||
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
||||
return fn.apply(isBind ? thisArg : this, args);
|
||||
return apply(fn, isBind ? thisArg : this, args);
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user