From dc2c75f18d1f79842a451586eeed85cd29fe1976 Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Wed, 24 Aug 2022 14:18:56 +0200 Subject: [PATCH] set `count`'s default value --- .../src/components/main-sidebar/components/chats/chat-item.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/status-react/src/components/main-sidebar/components/chats/chat-item.tsx b/packages/status-react/src/components/main-sidebar/components/chats/chat-item.tsx index 6a85a397..271ee500 100644 --- a/packages/status-react/src/components/main-sidebar/components/chats/chat-item.tsx +++ b/packages/status-react/src/components/main-sidebar/components/chats/chat-item.tsx @@ -20,7 +20,7 @@ const ChatItem = (props: Props, ref: Ref) => { const muted = false const unread = unreadChats.has(chat.id) - const count = unreadChats.get(chat.id)?.count + const count = unreadChats.get(chat.id)?.count ?? 0 const { color, displayName } = chat.identity!