Fix crash on profile opening

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-11-11 16:45:55 +05:30
parent 1207f5abad
commit cf6732fb29

View file

@ -249,8 +249,8 @@ function ProfileViewer() {
}, [isOpen]); }, [isOpen]);
function renderProfile() { function renderProfile() {
const member = room.getMember(userId) || mx.getUser(userId); const member = room.getMember(userId) || mx.getUser(userId) || {};
const avatarMxc = member.getMxcAvatarUrl() || member.avatarUrl; const avatarMxc = member.getMxcAvatarUrl?.() || member.avatarUrl;
return ( return (
<div className="profile-viewer"> <div className="profile-viewer">