Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 52e391a

Browse files
authored
Show space members when not invited even if summary didn't fail (#7153)
1 parent c2ab593 commit 52e391a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/structures/SpaceRoomView.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ const useMyRoomMembership = (room: Room) => {
128128
};
129129

130130
const SpaceInfo = ({ space }: { space: Room }) => {
131+
// summary will begin as undefined whilst loading and go null if it fails to load.
131132
const summary = useAsyncMemo(async () => {
132133
if (space.getMyMembership() !== "invite") return;
133134
try {
@@ -156,7 +157,7 @@ const SpaceInfo = ({ space }: { space: Room }) => {
156157
memberSection = <span className="mx_SpaceRoomView_info_memberCount">
157158
{ _t("%(count)s members", { count: summary.num_joined_members }) }
158159
</span>;
159-
} else if (summary === null) {
160+
} else if (summary !== undefined) { // summary is not still loading
160161
memberSection = <RoomMemberCount room={space}>
161162
{ (count) => count > 0 ? (
162163
<AccessibleButton

0 commit comments

Comments
 (0)