浏览代码

fix: iteration log index error (#14855)

Joel 1 月之前
父节点
当前提交
330dc2fd44
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/app/components/workflow/run/utils/format-log/iteration/index.ts

+ 1 - 1
web/app/components/workflow/run/utils/format-log/iteration/index.ts

@@ -6,7 +6,7 @@ function addChildrenToIterationNode(iterationNode: NodeTracing, childrenNodes: N
   childrenNodes.forEach((item, index) => {
     if (!item.execution_metadata) return
     const { iteration_index = 0 } = item.execution_metadata
-    const runIndex: number = iteration_index || index
+    const runIndex: number = iteration_index !== undefined ? iteration_index : index
     if (!details[runIndex])
       details[runIndex] = []