diff --git a/src/components/conversations/sidebar-conversation-list.tsx b/src/components/conversations/sidebar-conversation-list.tsx index 73297b5..10a86fa 100644 --- a/src/components/conversations/sidebar-conversation-list.tsx +++ b/src/components/conversations/sidebar-conversation-list.tsx @@ -216,7 +216,14 @@ export function SidebarConversationList({ const t = useTranslations("Folder.sidebar") const tCommon = useTranslations("Folder.common") const { zoomLevel } = useZoomLevel() - const cardHeightPx = (CARD_HEIGHT_REM * 16 * zoomLevel) / 100 + const safeZoomLevel = + typeof zoomLevel === "number" && Number.isFinite(zoomLevel) && zoomLevel > 0 + ? zoomLevel + : 100 + const cardHeightPx = Math.max( + 1, + Math.round((CARD_HEIGHT_REM * 16 * safeZoomLevel) / 100) + ) const { allFolders, conversations,