Open kinguru opened 7 years ago
i have the same problem, please remove following line:
https://github.com/adamwdraper/Numeral-js/blob/master/src/numeral.js#L468
I agree that this is an issue. In the mean time I worked around it by just checking to see if it exists first.
if (numeral.locales['user-locale'] === undefined) {
numeral.register('locale', 'user-locale', {});
}
......... this is really not fixed yet? Why would anyone want to throw? Just overwrite it.
The workaround above works for me in react. Thanks.
The workaround works for me too
I agree that this is an issue. In the mean time I worked around it by just checking to see if it exists first.
if (numeral.locales['user-locale'] === undefined) { numeral.register('locale', 'user-locale', {}); }
thanks, buddy it worked!!!
Hi,
Why second Locale registration throws an excpetion? My scenarion: I need dynamically update Locale by ajax. How I can do it in current codebase?
Thank you.