Skip to content

fix: resolve 2 bugs in leetcode-ranking - #394

Open
saurabhhhcodes wants to merge 1 commit into
codepvg:mainfrom
saurabhhhcodes:fix/leetcode-ranking-80658
Open

fix: resolve 2 bugs in leetcode-ranking#394
saurabhhhcodes wants to merge 1 commit into
codepvg:mainfrom
saurabhhhcodes:fix/leetcode-ranking-80658

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Description

This PR fixes real bugs found in the codebase:

  • Replaced global isNaN with Number.isNaN: the global version coerces its argument, so isNaN('1') returns false while Number.isNaN is strict.
  • Switched innerText to textContent: textContent is deterministic and faster since it skips layout recalc.

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thank you for submitting a pull request.

Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully.

Formatting and Branching

  • Please confirm you have formatted your code locally using npx prettier --write . before requesting a review.
  • Ensure this PR is made from a feature/* branch and not main.

Note: This project is currently maintained by a solo maintainer, so reviews and responses may sometimes take a little time. Thanks for your patience.

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