diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 7427e956f0..81ca9cbf5d 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -128,9 +128,9 @@ const useMyRoomMembership = (room: Room) => { }; const SpaceInfo = ({ space }: { space: Room }) => { - // summary will begin as undefined whilst loading and go null if it fails to load. + // summary will begin as undefined whilst loading and go null if it fails to load or we are not invited. const summary = useAsyncMemo(async () => { - if (space.getMyMembership() !== "invite") return; + if (space.getMyMembership() !== "invite") return null; try { return space.client.getRoomSummary(space.roomId); } catch (e) { @@ -141,7 +141,7 @@ const SpaceInfo = ({ space }: { space: Room }) => { const membership = useMyRoomMembership(space); let visibilitySection; - if (joinRule === "public") { + if (joinRule === JoinRule.Public) { visibilitySection = { _t("Public space") } ;