Fix Jitsi widgets causing localized tile crashes

Seems to be that as part of the layout work the timing sequence for when `.getRoom().widgets` will work changed. We can get around this with `initIfNeeded` which will no-op in the worst case.

This also includes a copy change to make ended conferences stop lying about where to find the widget. This is work towards https://github.com/vector-im/element-web/issues/15739
This commit is contained in:
Travis Ralston 2021-01-27 14:40:04 -07:00
parent 33a86f6cbe
commit c1b33d3e2c
2 changed files with 5 additions and 2 deletions

View file

@ -154,7 +154,8 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
this.emit(UPDATE_EVENT, roomId);
};
public getRoom = (roomId: string) => {
public getRoom = (roomId: string, initIfNeeded = false) => {
if (initIfNeeded) this.initRoom(roomId); // internally handles "if needed"
return this.roomMap.get(roomId);
};