From c557162592a38e99bf907a48f89d87eda4ca7d93 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Fri, 27 Jan 2023 15:14:20 +0100 Subject: [PATCH] Try to appease the linter --- src/components/structures/SpaceHierarchy.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/SpaceHierarchy.tsx b/src/components/structures/SpaceHierarchy.tsx index f99cf73f5f..84ec987337 100644 --- a/src/components/structures/SpaceHierarchy.tsx +++ b/src/components/structures/SpaceHierarchy.tsx @@ -419,7 +419,7 @@ const toLocalRoom = (cli: MatrixClient, room: IHierarchyRoom, hierarchy: RoomHie // Pick latest room that is actually part of the hierarchy let cliRoom = null; for (let idx = history.length - 1; idx >= 0; --idx) { - if (hierarchy.roomMap[history[idx].roomId]) { + if (hierarchy.roomMap.get(history[idx].roomId)) { cliRoom = history[idx]; break; } @@ -432,7 +432,7 @@ const toLocalRoom = (cli: MatrixClient, room: IHierarchyRoom, hierarchy: RoomHie room_type: cliRoom.getType(), name: cliRoom.name, topic: cliRoom.currentState.getStateEvents(EventType.RoomTopic, "")?.getContent().topic, - avatar_url: cliRoom.getMxcAvatarUrl(), + avatar_url: cliRoom.getMxcAvatarUrl() ?? undefined, canonical_alias: cliRoom.getCanonicalAlias(), aliases: cliRoom.getAltAliases(), world_readable: