Skip to content

fix: render fallback for empty avatar sources - #249

Merged
O2sa merged 1 commit into
O2sa:mainfrom
abhinavrastogi2627:fix/avatar-empty-source
Oct 17, 2026
Merged

O2sa merged 1 commit into
O2sa:mainfrom
abhinavrastogi2627:fix/avatar-empty-source

Conversation

@abhinavrastogi2627

Copy link
Copy Markdown
Contributor

Fixes #248

Empty, whitespace-only, null, and undefined avatar sources now render an accessible initial fallback instead of reaching next/image. This avoids rendering an image with an invalid source while retaining the existing image behavior for valid URLs.

Validation:

  • ./node_modules/.bin/vitest run (28 files, 227 tests)
  • ./node_modules/.bin/eslint . (passes; one existing warning in leaderboard-table.test.tsx)
  • ./node_modules/.bin/tsc --noEmit
  • ./node_modules/.bin/prettier --check src/components/layout/avatar.tsx src/components/layout/avatar.test.tsx
  • git diff --check

At submission, issue #248 is assigned to me and is not blocked.

@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@abhinavrastogi2627 is attempting to deploy a commit to the osama's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thank you for the pull request! ✅

A maintainer will review this soon. Please be patient while we take a look. 🙌

@O2sa
O2sa merged commit 80a7036 into O2sa:main Oct 17, 2026
2 of 3 checks passed
@O2sa

O2sa commented Oct 17, 2026

Copy link
Copy Markdown
Owner

🎊 Welcome, @abhinavrastogi2627! Your first contribution has been merged! 🚀

Thank you for helping improve the project! If you find this tool useful, please consider giving us a ⭐ star on GitHub—it helps more developers find our work and motivates us to keep improving!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Avatar component throws console error when src is empty or undefined

2 participants