Ver código fonte

[RN] Fix undefined.avatarID in ParticipantView

j8
Lyubo Marinov 8 anos atrás
pai
commit
e6f906b9ca

+ 5
- 5
react/features/base/participants/components/ParticipantView.native.js Ver arquivo

@@ -163,13 +163,13 @@ function _toBoolean(value, undefinedValue) {
163 163
  */
164 164
 function _mapStateToProps(state, ownProps) {
165 165
     const { participantId } = ownProps;
166
+    const participant
167
+        = getParticipantById(
168
+            state['features/base/participants'],
169
+            participantId);
166 170
 
167 171
     return {
168
-        _avatar:
169
-            getAvatarURL(
170
-                getParticipantById(
171
-                    state['features/base/participants'],
172
-                    participantId)),
172
+        _avatar: participant && getAvatarURL(participant),
173 173
         _videoTrack:
174 174
             getTrackByMediaTypeAndParticipant(
175 175
                 state['features/base/tracks'],

Carregando…
Cancelar
Salvar