From 4c72cceb70700ea9c9a36a938497520ba289dfdd Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 28 Apr 2023 09:13:26 +0100 Subject: [PATCH] Fix soft crash with Element call widgets (#10684) There was a race condition somewhere which would cause a soft crash of the whole app because WidgetPip here gets the currently active widget given a widget ID and room, but this can race and be null. Co-authored-by: Janne Mareike Koschinski --- src/components/views/pips/WidgetPip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/pips/WidgetPip.tsx b/src/components/views/pips/WidgetPip.tsx index 57a06e89f41..0ffdaf3efe1 100644 --- a/src/components/views/pips/WidgetPip.tsx +++ b/src/components/views/pips/WidgetPip.tsx @@ -123,7 +123,7 @@ export const WidgetPip: FC = ({ widgetId, room, viewingRoom, onStartMovin pointerEvents="none" movePersistedElement={movePersistedElement} /> - {(call !== null || WidgetType.JITSI.matches(widget.type)) && ( + {(call !== null || WidgetType.JITSI.matches(widget?.type)) && (