Skip to content

Commit

Permalink
Merging in the native bind branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Feb 28, 2011
1 parent 85460fe commit 513d322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
// optionally). Binding with arguments is also known as `curry`.
// Delegates to **ECMAScript 5**'s native `Function.bind` if available.
_.bind = function(func, obj) {
if(nativeBind && func.bind === nativeBind) return func.bind.apply(func, slice.call(arguments, 1));
if (nativeBind && func.bind === nativeBind) return func.bind.apply(func, slice.call(arguments, 1));
var args = slice.call(arguments, 2);
return function() {
return func.apply(obj || {}, args.concat(slice.call(arguments)));
Expand Down

0 comments on commit 513d322

Please sign in to comment.