Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit bf8c04f

Browse files
authored
Prevent MemberAvatar soft-crashing when rendered with null member prop (#7691)
1 parent 5973d72 commit bf8c04f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/views/avatars/MemberAvatar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export default class MemberAvatar extends React.Component<IProps, IState> {
9393
};
9494
} else {
9595
logger.error("MemberAvatar called somehow with null member or fallbackUserId");
96+
return {} as IState; // prevent an explosion
9697
}
9798
}
9899

0 commit comments

Comments
 (0)