Fix: Resolve 4 Bugs in Commitpulse - #8886
Conversation
|
Someone is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @saurabhhhcodes! Thanks for your contribution! 🎉 Unfortunately, this PR has been automatically closed because it is not linked to any open issue. To resolve this, please do the following:
We look forward to reviewing your PR once an issue is linked! 🚀 |
|
This pull request effectively resolves several critical bugs in the commitpulse codebase, including improvements to floating-point rounding, strict NaN checks, promise rejection handling, and integer parsing. These changes align with previous decisions made to enhance code reliability and prevent silent failures. Thank you for your contributions, and looking forward to your further improvements! |
Description
This PR fixes real bugs found in the codebase:
Number.EPSILONtoMath.round: prevents floating-point drift (e.g.1.005 * 100rounding to 100 instead of 101).isNaNwithNumber.isNaN: the global version coerces its argument, soisNaN('1')returns false whileNumber.isNaNis strict.Promise.all: an unhandled rejection in any input promise previously crashed silently.parseInt: without10, strings like'0x1F'or'08'parse in unintended bases.Type of Change
How Has This Been Tested?
Checklist
Related Issue
Ref: #8885