Commit 1c5d0787 authored by StyleZhang's avatar StyleZhang

hooks

parent e11fc8c1
......@@ -93,6 +93,7 @@ export const useWorkflow = () => {
return list
const traverse = (root: Node, callback: (node: Node) => void) => {
if (root) {
const incomers = getIncomers(root, nodes, edges)
if (incomers.length) {
......@@ -102,12 +103,13 @@ export const useWorkflow = () => {
})
}
}
}
traverse(currentNode, (node) => {
list.push(node)
})
const length = list.length
if (length && list.some(item => item.data.type === BlockEnum.Start)) {
if (length) {
return list.reverse().filter((item) => {
return SUPPORT_OUTPUT_VARS_NODE.includes(item.data.type)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment