From e8e2e3a13d0922dc7c21894a4ba6e2f183ec5e92 Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Thu, 17 Mar 2022 12:35:06 +0800 Subject: [PATCH] [Fix][UI Next][V1.0.0-Alpha] Fix the edge missing after editing the first task node in dag page. (#8947) --- .../views/projects/workflow/components/dag/use-cell-update.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-cell-update.ts b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-cell-update.ts index 8069ac924e..1cfc1e2da5 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-cell-update.ts +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-cell-update.ts @@ -86,7 +86,9 @@ export function useCellUpdate(options: Options) { const edges = getNodeEdge(id) if (edges?.length) { edges.forEach((edge) => { - graph.value?.removeEdge(edge) + if (edge.getTargetNode()?.id === id) { + graph.value?.removeEdge(edge) + } }) } preTaskCode.forEach((task) => {