mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Remove argument juggling from _.before.
This commit is contained in:
@@ -6648,13 +6648,7 @@
|
||||
function before(n, func) {
|
||||
var result;
|
||||
if (typeof func != 'function') {
|
||||
if (typeof n == 'function') {
|
||||
var temp = n;
|
||||
n = func;
|
||||
func = temp;
|
||||
} else {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
return function() {
|
||||
if (--n > 0) {
|
||||
|
||||
Reference in New Issue
Block a user