Fix: conversation.pinned may be undefined, use nullish coalescing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 14:02:13 +02:00
parent 713f0e7570
commit 8631971821

View File

@@ -181,7 +181,7 @@ function ChatHeader({ isDark, conversation, contact, showContactInfo, setShowCon
{/* Actions */}
<div className="flex items-center gap-2">
<HeaderButton isDark={isDark} active={conversation.pinned}
<HeaderButton isDark={isDark} active={conversation.pinned ?? false}
activeColor="amber" onClick={() => pinConversation(conversation.id)}
title={conversation.pinned ? 'Nicht mehr anheften' : 'Anheften'}>
<svg className="w-5 h-5" fill={conversation.pinned ? 'currentColor' : 'none'} stroke="currentColor" viewBox="0 0 24 24">