Closed rowanmanning closed 5 years ago
Thanks for this @rowanmanning, it's definitely not the correct behaviour to render undefined
or null
for any attribute. Your solution does the trick and pulls it into line with that.
I need to add a comment to this code as the most straightforward solution is probably to remove this condition entirely but because it's the most common case that would slow everything down!
Published as 1.0.0-beta.2
Currently because
class
andclassName
are handled differently to other attributes, they are renderingundefined
andnull
as strings rather than ignoring the attributes entirely.I've reduced my code down to bare-bones to demonstrate. Didn't want to actually commit, but running this in the repo:
results in:
I don't know whether my solution is ideal. Or whether this is even considered a bug, I'm new to all this fancy stuff 🤷♂️
Let me know if you'd like anything changed.