ReactionsRowButtonTooltip: fix null dereference if emoji owner left room

Signed-off-by: bkil <b.K.il.h.u+tigbuh@gmail.com>
This commit is contained in:
bkil 2019-11-21 01:50:18 +01:00
parent 2f084113f6
commit a40194194d

View file

@ -43,7 +43,8 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent {
if (room) { if (room) {
const senders = []; const senders = [];
for (const reactionEvent of reactionEvents) { 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); senders.push(name);
} }
const shortName = unicodeToShortcode(content); const shortName = unicodeToShortcode(content);