message: More explicit reference checking
diff: @@ -130,14 +130,15 @@ export class RoomPermalinkCreator {
  }
  forRoom() {
  - try {
  + if (this._room) {
  // Prefer to use canonical alias for permalink if possible
  const alias = this._room.getCanonicalAlias();
  + if (alias) {
  return getPermalinkConstructor().forRoom(alias, this._serverCandidates);
  - } catch (error) {
  - return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
  }
  }
  + return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
  + }
  onRoomState(event) {
  switch (event.getType()) {
  