Bug fix: Invalid edge connection data causes the page to crash. (#19369)

Co-authored-by: hzhufa <hzhufa@linewell.com>
This commit is contained in:
hzhufa 2025-05-08 12:57:10 +08:00 committed by GitHub
parent 3258a91d5d
commit 163a76eb6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,6 +67,9 @@ export const useWorkflowNodeStarted = () => {
incomeEdges.forEach((edge) => {
const incomeNode = nodes.find(node => node.id === edge.source)!
if (!incomeNode || !('data' in incomeNode))
return
if (
(!incomeNode.data._runningBranchId && edge.sourceHandle === 'source')
|| (incomeNode.data._runningBranchId && edge.sourceHandle === incomeNode.data._runningBranchId)