diff --git a/src/app/features/lobby/Lobby.tsx b/src/app/features/lobby/Lobby.tsx index 20850f75..23d41204 100644 --- a/src/app/features/lobby/Lobby.tsx +++ b/src/app/features/lobby/Lobby.tsx @@ -224,6 +224,7 @@ export function Lobby() { } } } + if (closedCategories.has(categoryId)) { closedCategoriesCache.current.set(categoryId, true); return true; diff --git a/src/app/pages/client/space/Space.tsx b/src/app/pages/client/space/Space.tsx index a78e67ae..81b4a881 100644 --- a/src/app/pages/client/space/Space.tsx +++ b/src/app/pages/client/space/Space.tsx @@ -452,13 +452,14 @@ export function Space() { return false; } + // As a subspace can be in multiple spaces, + // only return true if all parent spaces are closed. let anyOpen = false; parentParentIds.forEach((id) => { if (!getInClosedCategories(spaceId, id, parentId)) { anyOpen = true; } }); - closedCategoriesCache.current.set(categoryId, !anyOpen); return !anyOpen; },