From 8e66d382deee95f1e2bb82a1171d23846e39aeae Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 27 Aug 2019 16:18:22 +0200 Subject: [PATCH] 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 --- src/editor/parts.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/editor/parts.js b/src/editor/parts.js index bc420ecde1..8d0fe36c28 100644 --- a/src/editor/parts.js +++ b/src/editor/parts.js @@ -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(