mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Make _.defer and _.delay slice arguments in the timeout callback.
This commit is contained in:
@@ -6523,8 +6523,8 @@
|
|||||||
if (!isFunction(func)) {
|
if (!isFunction(func)) {
|
||||||
throw new TypeError(FUNC_ERROR_TEXT);
|
throw new TypeError(FUNC_ERROR_TEXT);
|
||||||
}
|
}
|
||||||
var args = slice(arguments, 1);
|
var args = arguments;
|
||||||
return setTimeout(function() { func.apply(undefined, args); }, 1);
|
return setTimeout(function() { func.apply(undefined, slice(args, 1)); }, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6547,8 +6547,8 @@
|
|||||||
if (!isFunction(func)) {
|
if (!isFunction(func)) {
|
||||||
throw new TypeError(FUNC_ERROR_TEXT);
|
throw new TypeError(FUNC_ERROR_TEXT);
|
||||||
}
|
}
|
||||||
var args = slice(arguments, 2);
|
var args = arguments;
|
||||||
return setTimeout(function() { func.apply(undefined, args); }, wait);
|
return setTimeout(function() { func.apply(undefined, slice(args, 2)); }, wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user