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