Merge pull request #81 from maberalc/main

Solved Issue #79
This commit is contained in:
MaTeMaTuK authored and GitHub committed 2022-07-10 14:17:35 +02:00
commit 557f3a6a9e
1 file changed
+4 -5
+4 -5
View File
@@ -40,11 +40,10 @@ function getChildren(taskList: Task[], task: Task) {
} else { } else {
tasks = taskList.filter(t => t.project && t.project === task.id); tasks = taskList.filter(t => t.project && t.project === task.id);
} }
const taskChildren = tasks.reduce( var taskChildren: Task[] = [];
(children: Task[], t) => tasks.forEach(t => {
children.concat(children, getChildren(taskList, t)), taskChildren.push(...getChildren(taskList, t));
[] })
);
tasks = tasks.concat(tasks, taskChildren); tasks = tasks.concat(tasks, taskChildren);
return tasks; return tasks;
} }