mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Apply rest arguments transform.
This commit is contained in:
@@ -18,9 +18,9 @@ function createBind(func, bitmask, thisArg) {
|
||||
var isBind = bitmask & WRAP_BIND_FLAG,
|
||||
Ctor = createCtor(func);
|
||||
|
||||
function wrapper() {
|
||||
function wrapper(...args) {
|
||||
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
||||
return fn.apply(isBind ? thisArg : this, arguments);
|
||||
return fn.apply(isBind ? thisArg : this, args);
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user