From 420222080ef8c1c0f82a78ca5edd5b646e8ca17a Mon Sep 17 00:00:00 2001 From: hiawui Date: Mon, 27 Jun 2022 20:37:43 +0800 Subject: [PATCH] fix endless loop when moving a bar within a cyclic dependencies --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 6d005afa..fe2ef3ff 100644 --- a/src/index.js +++ b/src/index.js @@ -813,11 +813,11 @@ export default class Gantt { return acc; }, []); - out = out.concat(deps); - to_process = deps.filter((d) => !to_process.includes(d)); + to_process = deps.filter((d) => !out.includes(d)); + out = out.concat(to_process); } - return out.filter(Boolean); + return out.filter((id) => id && id !== task_id); } get_snap_position(dx) {