Fix root space appear as category in cyclic relation

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-03-13 18:52:51 +05:30
parent 1ad5317d6e
commit af833daee4

View file

@ -18,7 +18,7 @@ function Home({ spaceId }) {
const { const {
spaces, rooms, directs, roomIdToParents, spaces, rooms, directs, roomIdToParents,
} = roomList; } = roomList;
const categorizedSpaces = useCategorizedSpaces(); useCategorizedSpaces();
const isCategorized = accountData.categorizedSpaces.has(spaceId); const isCategorized = accountData.categorizedSpaces.has(spaceId);
let categories = null; let categories = null;
@ -42,6 +42,7 @@ function Home({ spaceId }) {
if (isCategorized) { if (isCategorized) {
categories = roomList.getCategorizedSpaces(spaceIds); categories = roomList.getCategorizedSpaces(spaceIds);
categories.delete(spaceId);
} }
useEffect(() => { useEffect(() => {