fix: #2672 should use correct resend index

This commit is contained in:
Yifei Zhang 2023-08-21 18:33:45 +08:00 committed by GitHub
parent a4040fc1ee
commit e1142216ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}