Fix infinite loop in getPrecision() function
This commit is contained in:
parent
0604e61561
commit
403174fe60
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,9 @@ export function roundBigNumber(value: BigNumber, precision: number): BigNumber {
|
|||
}
|
||||
|
||||
function getPrecision(value: number): number {
|
||||
if (typeof value !== "number") {
|
||||
return 0
|
||||
}
|
||||
if (!isFinite(value)) {
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue