Skip to content

fix: resolve 4 bugs in RankerHub - #682

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

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

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Description

This PR fixes real bugs found in the codebase:

  • Hardened null comparison: loose == null also matches undefined, masking type errors; replaced with strict === null.
  • Simplified empty-string validation: comparing trim() to '' misses whitespace-only input; .trim().length === 0 is explicit.
  • Tightened == to ===: loose equality performs type coercion, which can silently compare 0 == '0' or false == 0 as equal.
  • Replaced global isNaN with Number.isNaN: the global version coerces its argument, so isNaN('1') returns false while Number.isNaN is strict.

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

@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:54pm

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation 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 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