瀏覽代碼

[RN] Fix undefined.avatarID in ParticipantView

j8
Lyubo Marinov 8 年之前
父節點
當前提交
e6f906b9ca
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5
    5
      react/features/base/participants/components/ParticipantView.native.js

+ 5
- 5
react/features/base/participants/components/ParticipantView.native.js 查看文件

@@ -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'],

Loading…
取消
儲存