Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 4c72cce

Browse files
dbkrjustjanne
andauthored
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 <janne@kuschku.de>
1 parent 30ac950 commit 4c72cce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/views/pips/WidgetPip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export const WidgetPip: FC<Props> = ({ widgetId, room, viewingRoom, onStartMovin
123123
pointerEvents="none"
124124
movePersistedElement={movePersistedElement}
125125
/>
126-
{(call !== null || WidgetType.JITSI.matches(widget.type)) && (
126+
{(call !== null || WidgetType.JITSI.matches(widget?.type)) && (
127127
<Toolbar className="mx_WidgetPip_footer">
128128
<RovingAccessibleTooltipButton
129129
onClick={onLeaveClick}

0 commit comments

Comments
 (0)