You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When there is more than one dismissable alert component on a single page, dismissing any alert component results in an uncaught TypeError in the console.
To Reproduce
Steps to reproduce the behavior:
Create a new Tailwind Elements project as described in the docs
Add more than one dismissable alert to a single HTML page using the example from the docs
Load the page and open devtools console
Close any of the dismissable alerts
An uncaught type error message appears in the console.
Expected behavior
Multiple dismissable alerts on the same HTML page should not produce unhandled exceptions when one is closed.
Actual behavior
Error code is as follows: alert.js:231 Uncaught TypeError: Cannot read properties of null (reading 'remove') at Rn._destroyElement (alert.js:231:6) at alert.js:127:1 at he (index.js:337:61) at HTMLDivElement.r (event-handler.js:22:23) at Ea (index.js:176:5) at event-handler.js:26:3
`
Describe the bug
When there is more than one dismissable alert component on a single page, dismissing any alert component results in an uncaught TypeError in the console.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Multiple dismissable alerts on the same HTML page should not produce unhandled exceptions when one is closed.
Actual behavior
Error code is as follows:
alert.js:231 Uncaught TypeError: Cannot read properties of null (reading 'remove') at Rn._destroyElement (alert.js:231:6) at alert.js:127:1 at he (index.js:337:61) at HTMLDivElement.r (event-handler.js:22:23) at Ea (index.js:176:5) at event-handler.js:26:3
`
Show your code
It will be easier for us to help you if you create a snippet using TE playground and include a link to it in your issue.
The system will not let me save snippets with an account that is < 7 days old, but I did test using this system with a very similar result.
I took the dismissable example from the docs (https://tailwind-elements.com/docs/standard/components/alerts/#dismissing) and added it twice to the snippet. When you close both, you will see errors in the console.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: