You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-16 06:42:26 +03:00
More explicit reference checking
This commit is contained in:
@@ -130,13 +130,14 @@ export class RoomPermalinkCreator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
forRoom() {
|
forRoom() {
|
||||||
try {
|
if (this._room) {
|
||||||
// Prefer to use canonical alias for permalink if possible
|
// Prefer to use canonical alias for permalink if possible
|
||||||
const alias = this._room.getCanonicalAlias();
|
const alias = this._room.getCanonicalAlias();
|
||||||
return getPermalinkConstructor().forRoom(alias, this._serverCandidates);
|
if (alias) {
|
||||||
} catch (error) {
|
return getPermalinkConstructor().forRoom(alias, this._serverCandidates);
|
||||||
return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
|
}
|
||||||
}
|
}
|
||||||
|
return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates);
|
||||||
}
|
}
|
||||||
|
|
||||||
onRoomState(event) {
|
onRoomState(event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user