From 3a3967d14f679cc83a8abd99b45b2b6862c4af23 Mon Sep 17 00:00:00 2001 From: Graeme Ainsworth Date: Sun, 21 Aug 2022 21:40:38 +1200 Subject: [PATCH] Fix Issue 92 Maximum call stack error if dependencies are looping and project is hidden --- src/helpers/other-helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/other-helper.ts b/src/helpers/other-helper.ts index afd5a362..4ef00870 100644 --- a/src/helpers/other-helper.ts +++ b/src/helpers/other-helper.ts @@ -42,7 +42,7 @@ function getChildren(taskList: Task[], task: Task) { } var taskChildren: Task[] = []; tasks.forEach(t => { - taskChildren.push(...getChildren(taskList, t)); + taskChildren.push(...getChildren(taskList.filter(t => t.id !== task.id), t)); }) tasks = tasks.concat(tasks, taskChildren); return tasks;