Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 9b1ae17

Browse files
committed
Check for missing a room
1 parent ab1f6b6 commit 9b1ae17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/views/messages/RoomCreate.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ export const RoomCreate: React.FC<IProps> = ({ mxEvent, timestamp }) => {
7979
}
8080

8181
const prevRoom = MatrixClientPeg.get().getRoom(predecessor.roomId);
82+
if (!prevRoom) {
83+
logger.warn(`Failed to find predecessor room with id ${predecessor.roomId}`);
84+
return <></>;
85+
}
8286
const permalinkCreator = new RoomPermalinkCreator(prevRoom, predecessor.roomId);
8387
permalinkCreator.load();
8488
let predecessorPermalink: string;

0 commit comments

Comments
 (0)