From b65d647de8405d314268092a9086a25771d575f2 Mon Sep 17 00:00:00 2001 From: Adam Craven Date: Sun, 20 Feb 2011 22:24:29 +0100 Subject: [PATCH] updated bind method to stop un-needed variable assignment when using native method. --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index 6b5a0b06e..54b9dcc98 100644 --- a/underscore.js +++ b/underscore.js @@ -409,8 +409,8 @@ // optionally). Binding with arguments is also known as `curry`. // Delegates to **ECMAScript 5**'s native `Function.bind` if available. _.bind = function(func, obj) { - var args = slice.call(arguments, 2); if(nativeBind && func.bind === nativeBind) return FuncProto.bind.apply(func, slice.call(arguments, 1)); + var args = slice.call(arguments, 2); return function() { return func.apply(obj || {}, args.concat(slice.call(arguments))); };