Skip to content

chore: fix JavaScript lint errors (issue #9110)#11939

Closed
alokchando wants to merge 1 commit intostdlib-js:developfrom
alokchando:patch-2
Closed

chore: fix JavaScript lint errors (issue #9110)#11939
alokchando wants to merge 1 commit intostdlib-js:developfrom
alokchando:patch-2

Conversation

@alokchando
Copy link
Copy Markdown
Contributor

Description

Fixed a RangeError: Invalid time value in
dispatch-workflow/lib/query.js caused by calling .toISOString() on an invalid Date object when info.reset is undefined or not a valid number.

Changes

  • Added typeof check to ensure info.reset is a number
  • Stored getTime() result in time variable
  • Used isNaN() guard before calling .toISOString()

Related Issues

resolves #9110

Checklist

AI Assistance

  • Yes

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Research and understanding

Disclosure

I used ChatGPT to understand the runtime error in dispatch-workflow/lib/query.js and to help design a safe validation fix for info.reset before calling .toISOString(). The final implementation was reviewed and applied manually by myself.


@stdlib-js/reviewers

## Description
Fixed a `RangeError: Invalid time value` in 
`dispatch-workflow/lib/query.js` caused by calling `.toISOString()` 
on an invalid Date object when `info.reset` is undefined or 
not a valid number.

## Changes
- Added `typeof` check to ensure `info.reset` is a number
- Stored `getTime()` result in `time` variable
- Used `isNaN()` guard before calling `.toISOString()`

## Related Issues
resolves stdlib-js#9110

Signed-off-by: alok chando <chandoalok@gmail.com>
@alokchando alokchando requested a review from a team May 5, 2026 04:05
@stdlib-bot stdlib-bot added Tools Issue or pull request related to project tooling. Needs Review A pull request which needs code review. labels May 5, 2026
@alokchando alokchando closed this May 5, 2026
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue: Resolve TypeScript declaration lint errors

2 participants