-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REF-2810] Error: img is a self-closing tag and must neither have children
nor use dangerouslySetInnerHTML
.
#3273
Comments
children
nor use dangerouslySetInnerHTML
.children
nor use dangerouslySetInnerHTML
.
@masenf i tried accessing the first args assuming the user forgot to pass in the src attribute but getting an empty list. i think it stops compiling after the error is thrown . unless otherwise, it'd be best to throw an actionable error in the terminal as you suggested |
@Yummy-Yums i think you would want to override the It's the call to |
@masenf applying the child as src still throws a browser error but works fine in the backend , so i guess throwing the TypeError in the |
in the else block, why not return super().create(src=children[0], **props) |
Fixed via #3307 |
Describe the bug
When a user makes a simple mistake, and passes the image
src
as a child, this causes a browser error.Instead Reflex should catch this at compile time and throw an actionable error in the terminal, or just assume what the user meant and apply the child as the
src
To Reproduce
OOOPS, meant to write it as
Screenshots
Poor user experience 😭
Specifics (please complete the following information):
From SyncLinear.com | REF-2810
The text was updated successfully, but these errors were encountered: