Fix MemberInfo handling User objects without crashing
This commit is contained in:
parent
2fbda42374
commit
83fdeeb180
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue