From 10c8a31736d075ebc34556f12db0ccb870d5688c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 8 Mar 2022 10:31:31 +0000 Subject: [PATCH] Add another null guard for member (#7984) * Add another null guard for member To hopefully fix https://github.com/vector-im/element-web/issues/21319 * Use getSender() Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/messages/SenderProfile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/messages/SenderProfile.tsx b/src/components/views/messages/SenderProfile.tsx index ae6df373b3..8bd9c43098 100644 --- a/src/components/views/messages/SenderProfile.tsx +++ b/src/components/views/messages/SenderProfile.tsx @@ -114,7 +114,7 @@ export default class SenderProfile extends React.Component { if (SettingsStore.getValue("feature_use_only_current_profiles")) { const room = MatrixClientPeg.get().getRoom(mxEvent.getRoomId()); if (room) { - member = room.getMember(member.userId); + member = room.getMember(mxEvent.getSender()); } }