globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 603 forks source link

New v1.2.* returns 0 when number-parsing empty strings #682

Closed samcic closed 7 years ago

samcic commented 7 years ago

See

http://stackoverflow.com/questions/41748476/globalize-bug-in-new-v1-2-parsing-empty-string-returns-0

In short, there seems to be a regression in v1.2.* in that empty strings are now number parsed to 0 instead of NaN This seems rather non-intuitive, and I can't imagine it's intentional.

rxaviers commented 7 years ago

This is indeed a bug and a regression that needs to be fixed. Thanks for reporting it.