don't crash on race with room members and initial composer render

not ideal, but for now this prevents a crash at startup
when a user-pill is persisted in local storage
This commit is contained in:
Bruno Windels 2019-08-27 16:18:22 +02:00
parent e0ec827a64
commit 8e66d382de

View file

@ -284,6 +284,9 @@ class UserPillPart extends PillPart {
}
setAvatar(node) {
if (!this._member) {
return;
}
const name = this._member.name || this._member.userId;
const defaultAvatarUrl = Avatar.defaultAvatarUrlForString(this._member.userId);
let avatarUrl = Avatar.avatarUrlForMember(