ReactionsRowButtonTooltip: fix null dereference if emoji owner left room

Signed-off-by: bkil <b.K.il.h.u+tigbuh@gmail.com>
pull/21833/head
bkil 2019-11-21 01:50:18 +01:00
parent 2f084113f6
commit a40194194d
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent {
if (room) {
const senders = [];
for (const reactionEvent of reactionEvents) {
const { name } = room.getMember(reactionEvent.getSender());
const member = room.getMember(reactionEvent.getSender());
const name = member ? member.name : reactionEvent.getSender();
senders.push(name);
}
const shortName = unicodeToShortcode(content);