MemberCount: Fix error when not in a channel (#2277)

This commit is contained in:
thororen 2024-03-19 07:06:09 -04:00 committed by GitHub
parent 90ee07fd98
commit ae9435ac55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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")) {