소스 검색

fix: workflow end node deletion (#4240)

tags/0.6.8
zxhlyh 1 년 전
부모
커밋
f49c99937c
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      web/app/components/workflow/hooks/use-nodes-interactions.ts

+ 2
- 2
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)

Loading…
취소
저장