From ae9435ac55dd7a420b59a6a9ab826e106fa2ef81 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 50665353..3231d01c 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")) {