Skip to content

Commit

Permalink
🖼️ fix: Prevent Empty Avatar Source (#4321)
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila committed Oct 27, 2024
1 parent 150c57e commit a5c0752
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Endpoints/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const UserAvatar = memo(({ size, user, avatarSrc, username, className }: UserAva
<UserIcon />
</div>
) : (
<img className="rounded-full" src={user?.avatar ?? avatarSrc} alt="avatar" />
<img className="rounded-full" src={(user?.avatar ?? '') || avatarSrc} alt="avatar" />
)}
</div>
));
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Nav/AccountSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function AccountSettings() {
) : (
<img
className="rounded-full"
src={user?.avatar ?? avatarSrc}
src={(user?.avatar ?? '') || avatarSrc}
alt={`${name}'s avatar`}
/>
)}
Expand Down

0 comments on commit a5c0752

Please sign in to comment.