Pārlūkot izejas kodu

chore: compatible with es5 (#14268)

KVOJJJin 1 mēnesi atpakaļ
vecāks
revīzija
aa6c951e8c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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],
   }))