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
Printing out null as the contents of an HTML text node through dangerouslySetInnerHTML activates the async renderer #333, and is removed from the output.
It used to be undefined but switched to null after this PR #339
E.g:
Correctly prints as text
<pdangerouslySetInnerHTML={{__html: undefined}}/>
Activates async renderer indirectly and is removed from the output.
<pdangerouslySetInnerHTML={{__html: null}}/>
The text was updated successfully, but these errors were encountered:
lfre
changed the title
"null" is being removed when used as value in dangerouslySetInnerHTML html
null is being removed when used as value in dangerouslySetInnerHTML html
Apr 2, 2024
Makes me wonder if that is a bug overall that we accepted non-string values as the HTML string. We should do the same as in Preact itself and only allow string + number children and treat anything else as empty.
Printing out
null
as the contents of an HTML text node throughdangerouslySetInnerHTML
activates the async renderer #333, and is removed from the output.It used to be
undefined
but switched tonull
after this PR #339E.g:
The text was updated successfully, but these errors were encountered: