瀏覽代碼

chore: compatible with es5 (#14268)

KVOJJJin 1 月之前
父節點
當前提交
aa6c951e8c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/app/components/base/chat/utils.ts

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