Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: iteration log index error (#14855)

Joel330dc2fd4401
diff --git a/web/app/components/workflow/run/utils/format-log/iteration/index.ts b/web/app/components/workflow/run/utils/format-log/iteration/index.ts
index d51c2315e34..d923d467839 100644
--- a/web/app/components/workflow/run/utils/format-log/iteration/index.ts
+++ b/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] = []