From 6f25ccae31be7464a4069e0ccbb612502caa06da Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Fri, 15 Apr 2011 18:01:53 -0400 Subject: [PATCH] michaelficarra's proposed tweak to _.after --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index c24c34645..8d55cc5ce 100644 --- a/underscore.js +++ b/underscore.js @@ -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); } }; };