Update countUp.ts - support large integer numbers#289
Update countUp.ts - support large integer numbers#289shani-360 wants to merge 4 commits intoinorganik:masterfrom
Conversation
|
Can you please show me how to reproduce this issue? I'm not clear what you are fixing. |
|
Hi, for example: [countUp] : 8889815748235620000 Will display the value as 8,889,815,748,235,620,352 (Will add extra 352 to the value) |
|
You found a legit bug, but I hesitate to even create an issue because I don't know a use case for it. The issue comes down to the fact that extremely large numbers in programming need special handling. Javascript has some ways to deal with this - (see Number.MAX_SAFE_INTEGER) but CountUp doesn't handle it. I appreciate your contribution, but your fix has some issues. There's a syntax error (backwards paren) on line 229. If you followed contribution guidelines, the tests would've caught this 🙂 . But even despite that the fix introduces errors for normal use cases like counting to 3000: because of the change in the If you have a real use case then please do create an issue, and steps to reproduce. Then if you want maybe take a more careful look at fixing it in this PR, accounting for the contributing guidelines and various use-cases. |
I'm submitting a...
Description
Large number keep original number without changing the value
Does this PR introduce a breaking change?