mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
allowing bind with undefined contexts, but with arguments
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user