ajv icon indicating copy to clipboard operation
ajv copied to clipboard

fix: coerce whitespace strings correctly

Open vwong opened this issue 2 years ago • 1 comments

What issue does this pull request resolve?

Number/Integer strings with only whitespace gets coerced to 0, when it should be undefined

What changes did you make?

The code already skips coercion on empty zero-length strings, I refined this to skip coercion on strings that are empty after .trim().

Is there anything that requires more attention while reviewing?

No

vwong avatar Jun 27 '23 06:06 vwong

The CI is broken, but I'm not sure what I would've done to cause it to break. Help?

vwong avatar Jun 28 '23 01:06 vwong