regression: `UserAvatar` should always render `BaseAvatar` (#34061)

pull/34091/head
Douglas Fabris 1 year ago committed by GitHub
parent 2b05900850
commit b604dabf4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      packages/ui-avatar/src/components/UserAvatar.tsx

@ -31,7 +31,8 @@ const UserAvatar = ({ username, userId, etag, ...rest }: UserAvatarProps) => {
return <BaseAvatar url={url} data-username={username} title={username} {...props} />;
}
throw new Error('ui-avatar(UserAvatar) - Either username or userId must be provided');
// TODO: We should throw an Error after fixing the issue in Composer passing the username undefined
return null;
};
export default memo(UserAvatar);

Loading…
Cancel
Save