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
It's quite common that we do not have any class name to be added to DOM, in such case returning undefined would allow having cleaner DOM, without empty class attributes.
I may be commenting the obvious on this old PR, but this simply will not work on various cases where classnames is still supposed to do its thing while not introducing unexpected classes to elements.
For example ... document.documentElement.classList.add(undefined) leads to, you may have guessed it ... <html class="undefined"> - which quite likely isn't what the author of the code intended.
It's quite common that we do not have any class name to be added to DOM, in such case returning
undefined
would allow having cleaner DOM, without emptyclass
attributes.Example with React's jsx:
results in:
<i class=""/>
while it should be:
<i/>
@see facebook/react#1448
The text was updated successfully, but these errors were encountered: