Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Fix undefined.avatarID in ParticipantView

Lyubo Marinove6f906b9ca9e
diff --git a/react/features/base/participants/components/ParticipantView.native.js b/react/features/base/participants/components/ParticipantView.native.js
index 2deced2c84..ed64d95981 100644
--- a/react/features/base/participants/components/ParticipantView.native.js
+++ b/react/features/base/participants/components/ParticipantView.native.js
@@ -163,13 +163,13 @@ function _toBoolean(value, undefinedValue) {
*/
function _mapStateToProps(state, ownProps) {
const { participantId } = ownProps;
+ const participant
+ = getParticipantById(
+ state['features/base/participants'],
+ participantId);
return {
- _avatar:
- getAvatarURL(
- getParticipantById(
- state['features/base/participants'],
- participantId)),
+ _avatar: participant && getAvatarURL(participant),
_videoTrack:
getTrackByMediaTypeAndParticipant(
state['features/base/tracks'],