From 52e391a92a13284238a0f997bb8dec95f8e2e303 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 19 Nov 2021 10:17:05 +0000 Subject: [PATCH] Show space members when not invited even if summary didn't fail (#7153) --- src/components/structures/SpaceRoomView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index becd05b9c99..da9834d2adb 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -128,6 +128,7 @@ const useMyRoomMembership = (room: Room) => { }; const SpaceInfo = ({ space }: { space: Room }) => { + // summary will begin as undefined whilst loading and go null if it fails to load. const summary = useAsyncMemo(async () => { if (space.getMyMembership() !== "invite") return; try { @@ -156,7 +157,7 @@ const SpaceInfo = ({ space }: { space: Room }) => { memberSection = { _t("%(count)s members", { count: summary.num_joined_members }) } ; - } else if (summary === null) { + } else if (summary !== undefined) { // summary is not still loading memberSection = { (count) => count > 0 ? (