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
This is caused by the if (!!mix.push) { check for Array, this makes clsx so fast, but I think it should be replaced with Array.isArray() or at least add this case to readme to warn people that get into this issue.
The text was updated successfully, but these errors were encountered:
Yeah, I forgot to mention this. It actually wasn't for speed (Array.isArray is really fast) but it was mostly for 100% browser support, including all old versions of IE. Most people won't care about this, but not 100% of people have that luxury (even today).
A silly side effect was that !!mix.push was 6 fewer bytes 😆
Let me make the rounds and talk to some folks and see if they care about this change in support – the "floor" would still only be IE9.. still pretty far back.
I'd then release a minor with Array.isArray support and a note for those who care about anything older.
In the following case all the classnames defined in the object are missing from the result:
This is caused by the
if (!!mix.push) {
check for Array, this makesclsx
so fast, but I think it should be replaced withArray.isArray()
or at least add this case to readme to warn people that get into this issue.The text was updated successfully, but these errors were encountered: