Null check userId on member. Fixes #5.

kegan/timestamp-hover
David Baker 2015-10-19 14:33:45 +01:00
parent e3e49daddb
commit 11aa6f8c37
1 changed files with 4 additions and 1 deletions

View File

@ -27,7 +27,10 @@ module.exports = {
resizeMethod resizeMethod
); );
if (!url) { if (!url) {
url = this.defaultAvatarUrlForString(member.userId); // member can be null here currently since on invites, the JS SDK
// does not have enough info to build a RoomMember object for
// the inviter.
url = this.defaultAvatarUrlForString(member ? member.userId : '');
} }
return url; return url;
}, },