From 86f433b873ec2fc7ccd324acc69171c2880b5095 Mon Sep 17 00:00:00 2001 From: ZLY Date: Mon, 22 Dec 2025 11:46:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(flow):=20=E4=BF=AE=E5=A4=8D=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E4=BA=8B=E4=BB=B6=E5=8F=82=E6=95=B0=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useFlowCallbacks.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hooks/useFlowCallbacks.ts b/src/hooks/useFlowCallbacks.ts index d8d9242..32f2eb8 100644 --- a/src/hooks/useFlowCallbacks.ts +++ b/src/hooks/useFlowCallbacks.ts @@ -1249,6 +1249,7 @@ export const useFlowCallbacks = ( }; nodes.forEach(node => { + appFlowParams.appEventList[node.id] = { x: node.position.x, y: node.position.y @@ -1274,7 +1275,7 @@ export const useFlowCallbacks = ( // 应用组件的桩点id就是事件id const sourceId = edge.sourceHandle; const targetId = edge.targetHandle; - const topic = edge.data.displayData.topic; + const topic = edge.data.displayData?.topic; if (eventMap.has(topic)) { // 如果topic已存在,将eventId添加到数组中 @@ -1298,8 +1299,10 @@ export const useFlowCallbacks = ( updateAppFlowData(appFlowParams); if (appEventParams.length > 0) { for (const item of appEventParams) { - await sleep(500); - await updateAppEventChannel(item); + if (item.topic) { + await sleep(500); + await updateAppEventChannel(item); + } } }