fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.33k stars 676 forks source link

Fix clear all bug when promise has neither a pending nor a success/error #1112

Open hufftheweevil opened 1 month ago

hufftheweevil commented 1 month ago

On resolving a promise, if there is no success/error, then the pending toast needs to be dismissed. But if there was no pending toast, then toast.dismiss() is being called with undefined, which clears all toast. It should only call toast.dimiss() if id exists for the pending toast.