From 1366d903332fc2af1560c2c45b4fac5e6c75719b Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 2 Apr 2012 16:11:51 -0400 Subject: [PATCH] default timeout'd scope is null / global. Fixes #484 --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index 458ecd324..7d516cac7 100644 --- a/underscore.js +++ b/underscore.js @@ -519,7 +519,7 @@ // it with the arguments supplied. _.delay = function(func, wait) { var args = slice.call(arguments, 2); - return setTimeout(function(){ return func.apply(func, args); }, wait); + return setTimeout(function(){ return func.apply(null, args); }, wait); }; // Defers a function, scheduling it to run after the current call stack has