ajv
ajv copied to clipboard
fix: coerce whitespace strings correctly
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
The CI is broken, but I'm not sure what I would've done to cause it to break. Help?