Event List Summary guard against missing event senders (#7767)

pull/21833/head
Michael Telatynski 2022-02-10 09:03:44 +00:00 committed by GitHub
parent 818fddd72c
commit e2196a8731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -485,7 +485,7 @@ export default class EventListSummary extends React.Component<IProps> {
if (e.target && TARGET_AS_DISPLAY_NAME_EVENTS.includes(type as EventType)) {
latestUserAvatarMember.set(userId, e.target);
} else {
} else if (e.sender) {
latestUserAvatarMember.set(userId, e.sender);
}
@ -494,7 +494,7 @@ export default class EventListSummary extends React.Component<IProps> {
displayName = e.getContent().display_name;
} else if (e.target && TARGET_AS_DISPLAY_NAME_EVENTS.includes(type as EventType)) {
displayName = e.target.name;
} else {
} else if (e.sender) {
displayName = e.sender.name;
}