From 29a060981cdd7fba7a97a98ce21df7d32ff916b0 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Tue, 19 Mar 2024 07:06:09 -0400 Subject: [PATCH] MemberCount: Fix error when not in a channel (#2277) --- src/plugins/memberCount/MemberCount.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/memberCount/MemberCount.tsx b/src/plugins/memberCount/MemberCount.tsx index 50665353e..3231d01ce 100644 --- a/src/plugins/memberCount/MemberCount.tsx +++ b/src/plugins/memberCount/MemberCount.tsx @@ -27,7 +27,7 @@ export function MemberCount({ isTooltip, tooltipGuildId }: { isTooltip?: true; t const { groups } = useStateFromStores( [ChannelMemberStore], - () => ChannelMemberStore.getProps(guildId, currentChannel.id) + () => ChannelMemberStore.getProps(guildId, currentChannel?.id) ); if (!isTooltip && (groups.length >= 1 || groups[0].id !== "unknown")) {