浏览代码

fix: #2672 should use correct resend index

Yifei Zhang 1 年之前
父节点
当前提交
e1142216ec
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/components/chat.tsx

+ 1 - 1
app/components/chat.tsx

@@ -802,7 +802,7 @@ function _Chat() {
       (m) => m.id === message.id,
     );
 
-    if (resendingIndex <= 0 || resendingIndex >= session.messages.length) {
+    if (resendingIndex < 0 || resendingIndex >= session.messages.length) {
       console.error("[Chat] failed to find resending message", message);
       return;
     }