diff --git a/src/components/views/messages/RoomPredecessorTile.tsx b/src/components/views/messages/RoomPredecessorTile.tsx index 5c47cda56fe..f1097d5a6e0 100644 --- a/src/components/views/messages/RoomPredecessorTile.tsx +++ b/src/components/views/messages/RoomPredecessorTile.tsx @@ -86,12 +86,13 @@ export const RoomPredecessorTile: React.FC = ({ mxEvent, timestamp }) => } const prevRoom = MatrixClientPeg.get().getRoom(predecessor.roomId); - if (!prevRoom) { - logger.warn(`Failed to find predecessor room with id ${predecessor.roomId}`); - return <>; - } const permalinkCreator = new RoomPermalinkCreator(prevRoom, predecessor.roomId); - permalinkCreator.load(); + if (prevRoom) { + permalinkCreator.load(); + } else { + logger.warn(`Creating permalink for unknown predecessor room ${predecessor.roomId},`+ + 'unlikely to be successful as rooms without via servers are usually not routable'); + } let predecessorPermalink: string; if (predecessor.eventId) { predecessorPermalink = permalinkCreator.forEvent(predecessor.eventId);