fix(web): node cannot be connected to itself

This commit is contained in:
zhaoying
2026-01-20 10:21:00 +08:00
parent 3ced895c9c
commit cd1a50a1d1

View File

@@ -729,6 +729,9 @@ export const useWorkflowGraph = ({
validateConnection({ sourceCell, targetCell, targetMagnet }) {
if (!targetMagnet) return false;
// 节点不能与自己连线
if (sourceCell?.id === targetCell?.id) return false;
const sourceType = sourceCell?.getData()?.type;
const targetType = targetCell?.getData()?.type;