mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 20:06:54 +08:00
fix: workflow end node deletion (#4240)
This commit is contained in:
@@ -893,14 +893,14 @@ export const useNodesInteractions = () => {
|
|||||||
} = store.getState()
|
} = store.getState()
|
||||||
|
|
||||||
const nodes = getNodes()
|
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) {
|
if (bundledNodes.length) {
|
||||||
bundledNodes.forEach(node => handleNodeDelete(node.id))
|
bundledNodes.forEach(node => handleNodeDelete(node.id))
|
||||||
return
|
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)
|
if (selectedNode)
|
||||||
handleNodeDelete(selectedNode.id)
|
handleNodeDelete(selectedNode.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user