Skip to content

Commit b909af8

Browse files
committed
keep fallback for backwards compat
1 parent 866ab8c commit b909af8

File tree

1 file changed

+3
-2
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/components/preview

1 file changed

+3
-2
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ interface WorkflowStackEntry {
3939

4040
/**
4141
* Extracts child trace spans from a workflow block's execution data.
42-
* Checks both the `children` property (where trace span processing moves them)
43-
* and the legacy `output.childTraceSpans` for compatibility.
42+
* Checks `children` property (where trace-spans processing puts them),
43+
* with fallback to `output.childTraceSpans` for old stored logs.
4444
*/
4545
function extractChildTraceSpans(blockExecution: BlockExecutionData | undefined): TraceSpan[] {
4646
if (!blockExecution) return []
@@ -49,6 +49,7 @@ function extractChildTraceSpans(blockExecution: BlockExecutionData | undefined):
4949
return blockExecution.children
5050
}
5151

52+
// Backward compat: old stored logs may have childTraceSpans in output
5253
if (blockExecution.output && typeof blockExecution.output === 'object') {
5354
const output = blockExecution.output as Record<string, unknown>
5455
if (Array.isArray(output.childTraceSpans)) {

0 commit comments

Comments
 (0)