Skip to content

Commit b604dab

Browse files
authored
regression: UserAvatar should always render BaseAvatar (RocketChat#34061)
1 parent 2b05900 commit b604dab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/ui-avatar/src/components/UserAvatar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ const UserAvatar = ({ username, userId, etag, ...rest }: UserAvatarProps) => {
3131
return <BaseAvatar url={url} data-username={username} title={username} {...props} />;
3232
}
3333

34-
throw new Error('ui-avatar(UserAvatar) - Either username or userId must be provided');
34+
// TODO: We should throw an Error after fixing the issue in Composer passing the username undefined
35+
return null;
3536
};
3637

3738
export default memo(UserAvatar);

0 commit comments

Comments
 (0)