we're reserving nativeBind ... we should be actually using it.

This commit is contained in:
Jeremy Ashkenas
2011-03-22 15:48:09 -04:00
parent 2498bccb50
commit 6d4b76705d

View File

@@ -410,7 +410,7 @@
// Delegates to **ECMAScript 5**'s native `Function.bind` if available.
// We check for `func.bind` first, to fail fast when `func` is undefined.
_.bind = function(func, obj) {
if (func.bind === nativeBind && nativeBind) return func.bind.apply(func, slice.call(arguments, 1));
if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
var args = slice.call(arguments, 2);
return function() {
return func.apply(obj, args.concat(slice.call(arguments)));