Avoid storing null for invite avatars.

This commit is contained in:
Danila Fedorin 2021-07-17 13:23:13 -07:00
parent 44b25e4157
commit ad453555b9

View file

@ -180,7 +180,7 @@ export class Invite extends EventEmitter {
_createData(inviteState, myInvite, inviter, summaryData, heroes) { _createData(inviteState, myInvite, inviter, summaryData, heroes) {
const name = heroes ? heroes.roomName : summaryData.name; const name = heroes ? heroes.roomName : summaryData.name;
const avatarUrl = heroes ? heroes.roomAvatarUrl : summaryData.avatarUrl; const avatarUrl = heroes ? heroes.roomAvatarUrl : summaryData.avatarUrl;
const avatarColorId = heroes ? heroes.roomAvatarColorId : this.id; const avatarColorId = heroes?.roomAvatarColorId || this.id;
return { return {
roomId: this.id, roomId: this.id,
isEncrypted: !!summaryData.encryption, isEncrypted: !!summaryData.encryption,