From ef35fe1d861252bdd905611c877985d3b82232b8 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sat, 7 Nov 2009 23:17:27 -0500 Subject: [PATCH] allowing bind with undefined contexts, but with arguments --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index 9386b8564..38eb363be 100644 --- a/underscore.js +++ b/underscore.js @@ -308,7 +308,7 @@ // Create a function bound to a given object (assigning 'this', and arguments, // optionally). Binding with arguments is also known as 'curry'. _.bind = function(func, context) { - if (!context) return func; + context = context || root; var args = _.toArray(arguments).slice(2); return function() { var a = args.concat(_.toArray(arguments));