Fix crash in profile viewer
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
090ada5807
commit
5e843f7a4f
1 changed files with 1 additions and 1 deletions
|
@ -358,7 +358,7 @@ function ProfileViewer() {
|
||||||
const renderProfile = () => {
|
const renderProfile = () => {
|
||||||
const roomMember = room.getMember(userId);
|
const roomMember = room.getMember(userId);
|
||||||
const username = roomMember ? getUsernameOfRoomMember(roomMember) : getUsername(userId);
|
const username = roomMember ? getUsernameOfRoomMember(roomMember) : getUsername(userId);
|
||||||
const avatarMxc = roomMember?.getMxcAvatarUrl?.() || mx.getUser(userId).avatarUrl;
|
const avatarMxc = roomMember?.getMxcAvatarUrl?.() || mx.getUser(userId)?.avatarUrl;
|
||||||
const avatarUrl = (avatarMxc && avatarMxc !== 'null') ? mx.mxcUrlToHttp(avatarMxc, 80, 80, 'crop') : null;
|
const avatarUrl = (avatarMxc && avatarMxc !== 'null') ? mx.mxcUrlToHttp(avatarMxc, 80, 80, 'crop') : null;
|
||||||
|
|
||||||
const powerLevel = roomMember.powerLevel || 0;
|
const powerLevel = roomMember.powerLevel || 0;
|
||||||
|
|
Loading…
Reference in a new issue