Commit 7e12b68
committed
Fix Infinity validation in addDaysToDateKey
The function only checked for NaN, not Infinity. If the date string represented
an extreme date, getTime() could return Infinity, causing the date arithmetic
to produce invalid results.
Changed Number.isNaN() to Number.isFinite() to catch both NaN and Infinity.1 parent 7b65652 commit 7e12b68
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments