mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
michaelficarra's proposed tweak to _.after
This commit is contained in:
@@ -512,7 +512,7 @@
|
||||
// Returns a function that will only be executed after being called N times.
|
||||
_.after = function(times, func) {
|
||||
return function() {
|
||||
if (--times === 0) { return func.apply(this, arguments); }
|
||||
if (--times < 1) { return func.apply(this, arguments); }
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user