From 83fdeeb1809df9db99686db159bc66ad894abcfd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 29 Jan 2020 07:53:23 +0000 Subject: [PATCH] Fix MemberInfo handling User objects without crashing --- src/components/views/rooms/MemberInfo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 55855bbc9a..7c77c546b6 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -1113,7 +1113,8 @@ export default createReactClass({ } } - const avatarUrl = this.props.member.getMxcAvatarUrl(); + const {member} = this.props; + const avatarUrl = member.avatarUrl || (member.getMxcAvatarUrl && member.getMxcAvatarUrl()); let avatarElement; if (avatarUrl) { const httpUrl = this.context.mxcUrlToHttp(avatarUrl, 800, 800);