Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: workflow delete edge when node is selected (#4414)

zxhlyhc0fe414e0af5
diff --git a/web/app/components/workflow/hooks/use-nodes-interactions.ts b/web/app/components/workflow/hooks/use-nodes-interactions.ts
index 026e8022688..e0e4f69c780 100644
--- a/web/app/components/workflow/hooks/use-nodes-interactions.ts
+++ b/web/app/components/workflow/hooks/use-nodes-interactions.ts
@@ -922,8 +922,13 @@ export const useNodesInteractions = () => {
const {
getNodes,
+ edges,
} = store.getState()
+ const edgeSelected = edges.some(edge => edge.selected)
+ if (edgeSelected)
+ return
+
const nodes = getNodes()
const bundledNodes = nodes.filter(node => node.data._isBundled && node.data.type !== BlockEnum.Start)