From f49c99937c429c19589371b8613f9fafe2b29dcf Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Fri, 10 May 2024 10:38:05 +0800 Subject: [PATCH] fix: workflow end node deletion (#4240) --- web/app/components/workflow/hooks/use-nodes-interactions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/hooks/use-nodes-interactions.ts b/web/app/components/workflow/hooks/use-nodes-interactions.ts index 68bb4d4aa..422e54f18 100644 --- a/web/app/components/workflow/hooks/use-nodes-interactions.ts +++ b/web/app/components/workflow/hooks/use-nodes-interactions.ts @@ -893,14 +893,14 @@ export const useNodesInteractions = () => { } = store.getState() const nodes = getNodes() - const bundledNodes = nodes.filter(node => node.data._isBundled && node.data.type !== BlockEnum.Start && node.data.type !== BlockEnum.End) + const bundledNodes = nodes.filter(node => node.data._isBundled && node.data.type !== BlockEnum.Start) if (bundledNodes.length) { bundledNodes.forEach(node => handleNodeDelete(node.id)) return } - const selectedNode = nodes.find(node => node.data.selected && node.data.type !== BlockEnum.Start && node.data.type !== BlockEnum.End) + const selectedNode = nodes.find(node => node.data.selected && node.data.type !== BlockEnum.Start) if (selectedNode) handleNodeDelete(selectedNode.id)