Commit b98af77
authored
chore: fix JavaScript lint errors (issue #9110)
## 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
Signed-off-by: alok chando <chandoalok@gmail.com>1 parent afe8812 commit b98af77
1 file changed
Lines changed: 12 additions & 1 deletion
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
| |||
0 commit comments