Skip to content

Commit

Permalink
Merge pull request #81 from maberalc/main
Browse files Browse the repository at this point in the history
Solved Issue #79
  • Loading branch information
MaTeMaTuK authored Jul 10, 2022
2 parents 62783f2 + 0ab5fba commit 557f3a6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/helpers/other-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ function getChildren(taskList: Task[], task: Task) {
} else {
tasks = taskList.filter(t => t.project && t.project === task.id);
}
const taskChildren = tasks.reduce(
(children: Task[], t) =>
children.concat(children, getChildren(taskList, t)),
[]
);
var taskChildren: Task[] = [];
tasks.forEach(t => {
taskChildren.push(...getChildren(taskList, t));
})
tasks = tasks.concat(tasks, taskChildren);
return tasks;
}
Expand Down

0 comments on commit 557f3a6

Please sign in to comment.