Prevent MemberAvatar soft-crashing when rendered with null member prop (#7691)

This commit is contained in:
Michael Telatynski 2022-02-01 15:06:16 +00:00 committed by GitHub
parent 5973d725e0
commit bf8c04ff55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,7 @@ export default class MemberAvatar extends React.Component<IProps, IState> {
}; };
} else { } else {
logger.error("MemberAvatar called somehow with null member or fallbackUserId"); logger.error("MemberAvatar called somehow with null member or fallbackUserId");
return {} as IState; // prevent an explosion
} }
} }