This commit is contained in:
archer 2025-01-25 14:21:21 +08:00
parent 991fbe254c
commit fcf14af64d
No known key found for this signature in database
GPG Key ID: 4446499B846D4A9E

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)));
};