Fix MemberInfo handling User objects without crashing

pull/21833/head
Michael Telatynski 2020-01-29 07:53:23 +00:00
parent 2fbda42374
commit 83fdeeb180
1 changed files with 2 additions and 1 deletions

View File

@ -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);