mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
we're reserving nativeBind ... we should be actually using it.
This commit is contained in:
@@ -410,7 +410,7 @@
|
|||||||
// Delegates to **ECMAScript 5**'s native `Function.bind` if available.
|
// Delegates to **ECMAScript 5**'s native `Function.bind` if available.
|
||||||
// We check for `func.bind` first, to fail fast when `func` is undefined.
|
// We check for `func.bind` first, to fail fast when `func` is undefined.
|
||||||
_.bind = function(func, obj) {
|
_.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);
|
var args = slice.call(arguments, 2);
|
||||||
return function() {
|
return function() {
|
||||||
return func.apply(obj, args.concat(slice.call(arguments)));
|
return func.apply(obj, args.concat(slice.call(arguments)));
|
||||||
|
|||||||
Reference in New Issue
Block a user