Skip to content

fix: resolve 4 bugs in Astrodex - #2125

Open
saurabhhhcodes wants to merge 1 commit into
Omnikon-Org:mainfrom
saurabhhhcodes:fix/Astrodex-16550
Open

fix: resolve 4 bugs in Astrodex#2125
saurabhhhcodes wants to merge 1 commit into
Omnikon-Org:mainfrom
saurabhhhcodes:fix/Astrodex-16550

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.
  • Replaced global isNaN with Number.isNaN: the global version coerces its argument, so isNaN('1') returns false while Number.isNaN is strict.
  • Simplified empty-string validation: comparing trim() to '' misses whitespace-only input; .trim().length === 0 is explicit.
  • 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: #2124

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Sp's projects Team on Vercel.

A member of the Team first needs to authorize it.

@mergify

mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@SourabhX16

Copy link
Copy Markdown
Member

@saurabhhhcodes

Thanks — nice, small, low-risk fixes. I reviewed the diffs and this is almost ready to merge, but I found two small issues:

One remaining use of the global isNaN in src/components/RightSidebar.tsx — please change:
Diff

  • const maxBurnsVal = isNaN(parsedBurns) ? 1 : parsedBurns
  • const maxBurnsVal = Number.isNaN(parsedBurns) ? 1 : parsedBurns
    This keeps behavior consistent with the other fixes and avoids coercion issues.

The PR description mentions an empty-string validation change (trim().length vs trim() === '') that I don't see in the diffs. Could you either:
update the PR description to reflect the actual changes, or
add the intended empty-string validation change in a follow-up commit?
Also: could you confirm CI/tests are passing after these edits?

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.

2 participants