Skip to content

fix: resolve multiple bugs in commitpulse - #8933

Closed
saurabhhhcodes wants to merge 1 commit into
JhaSourav07:mainfrom
saurabhhhcodes:fix/commitpulse-51313
Closed

fix: resolve multiple bugs in commitpulse#8933
saurabhhhcodes wants to merge 1 commit into
JhaSourav07:mainfrom
saurabhhhcodes:fix/commitpulse-51313

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

Description

This PR fixes real bugs found in the codebase:

  • Added Number.EPSILON to Math.round: prevents floating-point drift (e.g. 1.005 * 100 rounding to 100 instead of 101).
  • Replaced arr[arr.length - 1] with .at(-1): cleaner access to the last element.
  • Replaced global isNaN with Number.isNaN: the global version coerces its argument, so isNaN('1') returns false while Number.isNaN is strict.
  • Added explicit radix to parseInt: without 10, strings like '0x1F' or '08' parse in unintended bases.

Type of Change

  • Bug fix (non-breaking change fixing an issue)

How Has This Been Tested?

  • Local manual testing

Checklist

  • My code follows the style guidelines
  • I have performed a self-review

Related Issue

Ref: #8930

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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.

@retenta-bot

retenta-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

This pull request effectively resolves multiple bugs in the commitpulse codebase, including the addition of Number.EPSILON to Math.round, replacing global isNaN with Number.isNaN, and improving array access methods. These changes have been validated in past decisions, emphasizing the importance of preventing floating-point drift and ensuring strict type checking. Thank you for your contributions!

@retenta-bot retenta-bot Bot changed the title fix: resolve 4 bugs in commitpulse fix: resolve multiple bugs in commitpulse Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

👋 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:

  1. Link a valid open issue by editing your PR description to include a closing keyword (e.g., Fixes #<issue-number>).
  2. Reopen this PR once the link is added.

💡 You can link multiple issues if needed (e.g. Fixes #12, Closes #34).
If you're working on something that doesn't have an issue yet, please open one first and then link it here.

We look forward to reviewing your PR once an issue is linked! 🚀

@github-actions github-actions Bot closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant