Skip to content

Commit

Permalink
added check for NaN BigNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 25, 2024
1 parent 30fa255 commit ecf3df0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/math/HugeDecimal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { BigNumber } from 'bignumber.js'

const valueToBigNumber = (n: HugeDecimal.Value): BigNumber =>
n instanceof BigNumber
n === null || n === undefined
? new BigNumber(NaN)
: n instanceof BigNumber
? n
: n instanceof HugeDecimal
? n['value']
Expand Down

0 comments on commit ecf3df0

Please sign in to comment.