Prevent the permalink creator from causing cascading failure
This commit is contained in:
parent
2ca281f6b7
commit
b8551f00b2
1 changed files with 8 additions and 0 deletions
|
@ -83,6 +83,14 @@ export class RoomPermalinkCreator {
|
|||
}
|
||||
|
||||
load() {
|
||||
if (!this._room || !this._room.currentState) {
|
||||
// Under rare and unknown circumstances it is possible to have a room with no
|
||||
// currentState, at least potentially at the early stages of joining a room.
|
||||
// To avoid breaking everything, we'll just warn rather than throw as well as
|
||||
// not bother updating the various aspects of the share link.
|
||||
console.warn("Tried to load a permalink creator with no room state");
|
||||
return;
|
||||
}
|
||||
this._updateAllowedServers();
|
||||
this._updateHighestPlUser();
|
||||
this._updatePopulationMap();
|
||||
|
|
Loading…
Reference in a new issue