check room exists
This commit is contained in:
parent
fe71c17bb7
commit
be3d12721c
1 changed files with 3 additions and 0 deletions
|
@ -243,6 +243,9 @@ export function makeRoomPermalink(roomId) {
|
||||||
|
|
||||||
const client = MatrixClientPeg.get();
|
const client = MatrixClientPeg.get();
|
||||||
const room = client.getRoom(roomId);
|
const room = client.getRoom(roomId);
|
||||||
|
if (!room) {
|
||||||
|
return permalinkBase;
|
||||||
|
}
|
||||||
const permalinkCreator = new RoomPermalinkCreator(room);
|
const permalinkCreator = new RoomPermalinkCreator(room);
|
||||||
permalinkCreator.load();
|
permalinkCreator.load();
|
||||||
return permalinkCreator.forRoom();
|
return permalinkCreator.forRoom();
|
||||||
|
|
Loading…
Reference in a new issue