mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
stop assigning to arguments object in _.compose
This commit is contained in:
@@ -379,10 +379,11 @@
|
||||
_.compose = function() {
|
||||
var funcs = _.toArray(arguments);
|
||||
return function() {
|
||||
var args = _.toArray(arguments);
|
||||
for (var i=funcs.length-1; i >= 0; i--) {
|
||||
arguments = [funcs[i].apply(this, arguments)];
|
||||
args = [funcs[i].apply(this, args)];
|
||||
}
|
||||
return arguments[0];
|
||||
return args[0];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user