Skip to content

Commit eb51311

Browse files
committed
Fix reaction crash (#4608)
* Fix crash bug for remote screen share
1 parent b68fb86 commit eb51311

4 files changed

Lines changed: 36 additions & 14 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "",
5+
"comment": "Fix crash bug for remote screen share",
6+
"packageName": "@azure/communication-react",
7+
"email": "jiangnanhello@live.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "",
5+
"comment": "Fix crash bug for remote screen share",
6+
"packageName": "@azure/communication-react",
7+
"email": "jiangnanhello@live.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-components/src/components/RemoteVideoTile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ export const _RemoteVideoTile = React.memo(
203203
return remoteParticipant.displayName;
204204
};
205205

206-
const reactionOverlay = (
206+
const reactionOverlay = reactionResources && (
207207
<MeetingReactionOverlay
208208
overlayMode="grid-tiles"
209209
reaction={remoteParticipant.reaction}
210-
reactionResources={reactionResources!}
210+
reactionResources={reactionResources}
211211
/>
212212
);
213213

packages/react-components/src/components/VideoGallery/RemoteScreenShare.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ export const RemoteScreenShare = React.memo(
9393
}
9494
onRenderPlaceholder={() => <LoadingSpinner loadingMessage={loadingMessage} />}
9595
overlay={
96-
<MeetingReactionOverlay
97-
reactionResources={reactionResources!}
98-
localParticipant={localParticipant}
99-
remoteParticipants={remoteParticipants}
100-
overlayMode="screen-share"
101-
/>
96+
reactionResources && (
97+
<MeetingReactionOverlay
98+
reactionResources={reactionResources}
99+
localParticipant={localParticipant}
100+
remoteParticipants={remoteParticipants}
101+
overlayMode="screen-share"
102+
/>
103+
)
102104
}
103105
/>
104106
);
@@ -115,12 +117,14 @@ export const RemoteScreenShare = React.memo(
115117
}
116118
onRenderPlaceholder={() => <LoadingSpinner loadingMessage={loadingMessage} />}
117119
overlay={
118-
<MeetingReactionOverlay
119-
reactionResources={reactionResources!}
120-
localParticipant={localParticipant}
121-
remoteParticipants={remoteParticipants}
122-
overlayMode="screen-share"
123-
/>
120+
reactionResources && (
121+
<MeetingReactionOverlay
122+
reactionResources={reactionResources}
123+
localParticipant={localParticipant}
124+
remoteParticipants={remoteParticipants}
125+
overlayMode="screen-share"
126+
/>
127+
)
124128
}
125129
/>
126130
);

0 commit comments

Comments
 (0)