This commit is contained in:
archer
2025-01-25 14:21:21 +08:00
parent b79d7e4015
commit 0b392073b6

View File

@@ -176,6 +176,7 @@ export const checkNodeRunStatus = ({
}
visited.add(edge.source);
// 递归检测后面的 edge如果有其中一个成环则返回 true
const nextEdges = allEdges.filter((item) => item.target === edge.source);
return nextEdges.some((nextEdge) => checkIsCircular(nextEdge, new Set(visited)));
};