Skip to content

Commit

Permalink
Fixed some more linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fkrauthan committed Jan 18, 2017
1 parent 8150630 commit 092d404
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ function validateTaskToExecute(name, item, arrayCount = 0) {
export function taskGroup(name, tasksToExecute, options) {
validateTaskToExecute(name, tasksToExecute);

return taskCollector.addTask(name, (...args) => {
return tasksToExecute.reduce((accumulator, currentValue) => {
return accumulator.then((res) => {
return taskCollector.addTask(name, (...args) => (
tasksToExecute.reduce((accumulator, currentValue) => (
accumulator.then(() => {
if (Array.isArray(currentValue)) {
return Promise.all(currentValue.map(t => taskCollector.runTask(t, args, false)));
}
return taskCollector.runTask(currentValue, args, false);
});
}, Promise.resolve());
}, options);
})
), Promise.resolve())
), options);
}

export function runTask(name, ...args) {
Expand Down

0 comments on commit 092d404

Please sign in to comment.