Skip to content

fix: resolve 4 bugs in RankerHub - #679

Open
saurabhhhcodes wants to merge 1 commit into
indresh404:mainfrom
saurabhhhcodes:fix/RankerHub-51577
Open

fix: resolve 4 bugs in RankerHub#679
saurabhhhcodes wants to merge 1 commit into
indresh404:mainfrom
saurabhhhcodes:fix/RankerHub-51577

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

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).
  • Added explicit radix to parseInt: without 10, strings like '0x1F' or '08' parse in unintended bases.
  • Tightened == to ===: loose equality performs type coercion, which can silently compare 0 == '0' or false == 0 as equal.
  • Removed redundant boolean comparison: x === true is equivalent to x (and x === false to !x), and shorter to read.

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: #678

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ranker-hub Ready Ready Preview Aug 5, 2026 12:22pm

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request frontend Frontend related changes (HTML/CSS/JS/React) nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant