mirror of https://github.com/vector-im/riot-web
Null-check the widget before continuing
Deleted widgets should return isPinned=falsepull/21833/head
parent
e52a02d733
commit
e849cd8fe5
|
@ -158,7 +158,8 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
|
||||||
|
|
||||||
let pinned = roomInfo && roomInfo.pinned[widgetId];
|
let pinned = roomInfo && roomInfo.pinned[widgetId];
|
||||||
// Jitsi widgets should be pinned by default
|
// Jitsi widgets should be pinned by default
|
||||||
if (pinned === undefined && WidgetType.JITSI.matches(this.widgetMap.get(widgetId).type)) pinned = true;
|
const widget = this.widgetMap.get(widgetId);
|
||||||
|
if (pinned === undefined && WidgetType.JITSI.matches(widget?.type)) pinned = true;
|
||||||
return pinned;
|
return pinned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue