You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Null-check the widget before continuing
Deleted widgets should return isPinned=false
This commit is contained in:
@@ -158,7 +158,8 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
|
||||
|
||||
let pinned = roomInfo && roomInfo.pinned[widgetId];
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user