Commit e41b23e
committed
fix: guard CAST(val AS BIGINT) against Infinity from toNumber()
CAST('infinity' AS BIGINT) would call BigInt(Math.trunc(Infinity))
which throws RangeError. toNumber() can return Infinity for extreme
bigint→number conversions or parseFloat("infinity"). Added
Number.isFinite guard, returning 0n for non-finite values.1 parent 06477ac commit e41b23e
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
0 commit comments