Closed nkovacs closed 6 years ago
Thanks @nkovacs!! Great catch!
I left a comment above. What do you think? Just let me know if you have any questions about it...
Pull request for compiler is up: https://github.com/globalizejs/globalize-compiler/pull/31 and I've removed the hack in core-runtime.js.
I've rebased on master and uncommented the compiler test. Travis fails because of the missing compiler change.
Ok thanks
@nkovacs, other formatters (e.g., date, relative time) also include a number formatter in their runtime properties. We need to understand why this happens with unit formatter, but not with the other ones...
No other formatter accepts a formatter as an option which should affect the runtimeKey.
True! Thanks
JSON.stringify omits functions, so the generated runtimeKey did not depend on the value of the numberFormatter option, causing different unitFormatters to have an identical runtimeKey.
Fixes #704