mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	Fix Pin Message: when userMessageIndex === 0, pinning a message was not possible.
This commit is contained in:
		@@ -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) =>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user