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

Commit

Permalink
Fix soft crash with Element call widgets (#10684)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dbkr and justjanne authored Apr 28, 2023
1 parent 30ac950 commit 4c72cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/views/pips/WidgetPip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const WidgetPip: FC<Props> = ({ widgetId, room, viewingRoom, onStartMovin
pointerEvents="none"
movePersistedElement={movePersistedElement}
/>
{(call !== null || WidgetType.JITSI.matches(widget.type)) && (
{(call !== null || WidgetType.JITSI.matches(widget?.type)) && (
<Toolbar className="mx_WidgetPip_footer">
<RovingAccessibleTooltipButton
onClick={onLeaveClick}
Expand Down

0 comments on commit 4c72cce

Please sign in to comment.