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.

chore: compatible with es5 (#14268)

KVOJJJinaa6c951e8c51
diff --git a/web/app/components/base/chat/utils.ts b/web/app/components/base/chat/utils.ts
index ce7a7c09b32..2b4112935ee 100644
--- a/web/app/components/base/chat/utils.ts
+++ b/web/app/components/base/chat/utils.ts
@@ -100,7 +100,7 @@ function getThreadMessages(tree: ChatItemInTree[], targetMessageId?: string): Ch
let targetNode: ChatItemInTree | undefined
// find path to the target message
- const stack = tree.toReversed().map(rootNode => ({
+ const stack = tree.slice().reverse().map(rootNode => ({
node: rootNode,
path: [rootNode],
}))