Преглед на файлове

Merge pull request #2133 from quzard/fix_pin_bug

Fix Pin Message
Yifei Zhang преди 1 година
родител
ревизия
d62eb56886
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/components/chat.tsx

+ 1 - 1
app/components/chat.tsx

@@ -700,7 +700,7 @@ export function Chat() {
   const onPinMessage = (botMessage: ChatMessage) => {
     if (!botMessage.id) return;
     const userMessageIndex = findLastUserIndex(botMessage.id);
-    if (!userMessageIndex) return;
+    if (userMessageIndex === null) return;
 
     const userMessage = session.messages[userMessageIndex];
     chatStore.updateCurrentSession((session) =>