|
@@ -176,11 +176,11 @@ class Avatar<P: Props> extends PureComponent<P, State> {
|
176
|
176
|
*/
|
177
|
177
|
export function _mapStateToProps(state: Object, ownProps: Props) {
|
178
|
178
|
const { colorBase, displayName, participantId } = ownProps;
|
179
|
|
- const _participant = participantId && getParticipantById(state, participantId);
|
180
|
|
- const _initialsBase = (_participant && _participant.name) || displayName;
|
|
179
|
+ const _participant: ?Object = participantId && getParticipantById(state, participantId);
|
|
180
|
+ const _initialsBase = _participant?.name ?? displayName;
|
181
|
181
|
const screenShares = state['features/video-layout'].screenShares || [];
|
182
|
182
|
|
183
|
|
- let _loadableAvatarUrl = _participant && _participant.loadableAvatarUrl;
|
|
183
|
+ let _loadableAvatarUrl = _participant?.loadableAvatarUrl;
|
184
|
184
|
|
185
|
185
|
if (participantId && screenShares.includes(participantId)) {
|
186
|
186
|
_loadableAvatarUrl = 'icon://share-desktop';
|