Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#2133 from quzard/fix_pin_bug
Browse files Browse the repository at this point in the history
Fix Pin Message
  • Loading branch information
Yidadaa authored Jun 25, 2023
2 parents 679321e + cfe94e6 commit 5bbcdc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down

0 comments on commit 5bbcdc2

Please sign in to comment.