Skip to content

fix: prevent double icon render in promise toast (bug #718)#737

Open
AyushNigam-1 wants to merge 2 commits intoemilkowalski:mainfrom
AyushNigam-1:fix/double-icon-toast-718
Open

fix: prevent double icon render in promise toast (bug #718)#737
AyushNigam-1 wants to merge 2 commits intoemilkowalski:mainfrom
AyushNigam-1:fix/double-icon-toast-718

Conversation

@AyushNigam-1
Copy link
Copy Markdown

Summary

Fixes bug #718 where toast.promise with a custom success icon renders both the loader and success icon.

The update ensures only the loader is shown during loading, and only the final icon is shown after resolve/reject.

Test

Added a Playwright test that reproduces the issue by using a custom SVG success icon and asserting only one SVG is rendered after resolution.

Notes

Some existing Playwright tests fail locally even on upstream code (auto-close callback + empty-id dismiss). These appear unrelated to this change.

The test uses an inline SVG to make the regression deterministic. Happy to adjust if a different approach is preferred.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sonner Ready Ready Preview, Comment Feb 6, 2026 1:22am

Request Review

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.

1 participant