From e1142216eca8c91701457a2a85cbe45d1e7c3ec9 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Mon, 21 Aug 2023 18:33:45 +0800 Subject: [PATCH] fix: #2672 should use correct resend index --- app/components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 65620858..9a9488dd 100644 --- a/app/components/chat.tsx +++ b/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; }