chore: compatible with es5 (#14268)

This commit is contained in:
KVOJJJin
2025-02-25 09:46:54 +08:00
committed by GitHub
parent c4f4dfc3fb
commit aa6c951e8c

View File

@@ -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],
}))