Closed DetachHead closed 1 year ago
This code came from this commit: https://github.com/hperrin/svelte-material-ui/commit/939543f2a824deac29e77a912cb26cbe0dd0f2fb
Let me figure out if this change will cause any issues.
It does cause the floating label to stay floating when the input is empty.
I was able to fix that problem by checking explicitly for NaN in the floating label check.
Thanks for the fix!
i'm not sure why it was creating a
new Number
and setting alength
property on it. my understanding is that the primitive wrapper objects (Number
,String
, etc.) should be avoided.in my case it was causing problems in my code because i was using
typeof value === 'number'
to check if a value was a number, when it was actually an'object'