Skip to content

Commit

Permalink
remove unnecessary cloning in autoInject
Browse files Browse the repository at this point in the history
  • Loading branch information
aearly committed Mar 9, 2016
1 parent b75d006 commit ecdb0a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/autoInject.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function autoInject(tasks, callback) {
params = clone(taskFn);
taskFn = params.pop();

newTasks[key] = clone(params).concat(newTask);
newTasks[key] = params.concat(newTask);
} else if (taskFn.length === 0) {
throw new Error("autoInject task functions require explicit parameters.");
} else if (taskFn.length === 1) {
Expand All @@ -30,7 +30,7 @@ export default function autoInject(tasks, callback) {
params = parseParams(taskFn);
params.pop();

newTasks[key] = clone(params).concat(newTask);
newTasks[key] = params.concat(newTask);
}

function newTask(results, taskCb) {
Expand Down

0 comments on commit ecdb0a0

Please sign in to comment.