mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-30 19:01:17 +02:00
Merge pull request #2882 from matrix-org/travis/permalink-explosion
Prevent the permalink creator from causing cascading failure
This commit is contained in:
commit
a53d9f59fe
@ -83,6 +83,14 @@ export class RoomPermalinkCreator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
load() {
|
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._updateAllowedServers();
|
||||||
this._updateHighestPlUser();
|
this._updateHighestPlUser();
|
||||||
this._updatePopulationMap();
|
this._updatePopulationMap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user