From bf8c04ff556e712a5fda4fff4bd372a316ab8ec4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 1 Feb 2022 15:06:16 +0000 Subject: [PATCH] Prevent MemberAvatar soft-crashing when rendered with null member prop (#7691) --- src/components/views/avatars/MemberAvatar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/avatars/MemberAvatar.tsx b/src/components/views/avatars/MemberAvatar.tsx index 23bdada593..6ef08775fd 100644 --- a/src/components/views/avatars/MemberAvatar.tsx +++ b/src/components/views/avatars/MemberAvatar.tsx @@ -93,6 +93,7 @@ export default class MemberAvatar extends React.Component { }; } else { logger.error("MemberAvatar called somehow with null member or fallbackUserId"); + return {} as IState; // prevent an explosion } }