Update web/app/components/workflow/utils/top-level-tracing.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
盐粒 Yanli 2026-03-10 20:13:49 +08:00 committed by GitHub
parent 715f3affe5
commit e6f00a2bf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,9 +11,7 @@ export const upsertTopLevelTracingNodeOnStart = (
if (isNestedTracingNode(startedNode)) if (isNestedTracingNode(startedNode))
return false return false
const currentIndex = startedNode.id const currentIndex = tracing.findIndex(item => item.id === startedNode.id)
? tracing.findIndex(item => item.id === startedNode.id)
: tracing.findIndex(item => item.node_id === startedNode.node_id)
if (currentIndex > -1) if (currentIndex > -1)
// Started events are the authoritative snapshot for an execution; merging would retain stale client-side fields. // Started events are the authoritative snapshot for an execution; merging would retain stale client-side fields.
tracing[currentIndex] = startedNode tracing[currentIndex] = startedNode