fix(useFlowCallback): 修复onConnect中自旋连接的问题

feature
钟良源 4 weeks ago
parent 9f974861e5
commit 84736d074e

@ -187,6 +187,12 @@ export const useFlowCallbacks = (
if (!sourceNode || !targetNode) { if (!sourceNode || !targetNode) {
return; return;
} }
// 不允许链接到自己的节点上
if (sourceNode.id === targetNode.id) {
console.warn("不允许自旋链接");
return;
}
// 获取源节点和目标节点的参数信息 // 获取源节点和目标节点的参数信息
const sourceParams: any = sourceNode.data?.parameters || {}; const sourceParams: any = sourceNode.data?.parameters || {};
const targetParams: any = targetNode.data?.parameters || {}; const targetParams: any = targetNode.data?.parameters || {};

Loading…
Cancel
Save