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

pull/21833/head
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
1 changed files with 1 additions and 0 deletions

View File

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