Fix crash on space leave
authorAjay Bura <32841439+ajbura@users.noreply.github.com>
Wed, 28 Sep 2022 12:47:15 +0000 (18:17 +0530)
committerAjay Bura <32841439+ajbura@users.noreply.github.com>
Wed, 28 Sep 2022 12:47:15 +0000 (18:17 +0530)
src/app/organisms/navigation/Home.jsx

index 9e7495609abfdfc8205a621a6e9a82ae06a2ab3c..6bfa6c0ddd589f47d38c8b94e78f6d63d113b19f 100644 (file)
@@ -25,7 +25,7 @@ function Home({ spaceId }) {
   let directIds = [];
 
   if (spaceId) {
-    const spaceChildIds = roomList.getSpaceChildren(spaceId);
+    const spaceChildIds = roomList.getSpaceChildren(spaceId) ?? [];
     spaceIds = spaceChildIds.filter((roomId) => spaces.has(roomId));
     roomIds = spaceChildIds.filter((roomId) => rooms.has(roomId));
     directIds = spaceChildIds.filter((roomId) => directs.has(roomId));