Fix floorToDecimal when there are zero decimals
This commit is contained in:
parent
da08dd706e
commit
c1c1cfe43c
|
@ -28,7 +28,7 @@ export function floorToDecimal(
|
|||
value: number,
|
||||
decimals: number | undefined | null,
|
||||
) {
|
||||
return decimals ? Math.floor(value * 10 ** decimals) / 10 ** decimals : value;
|
||||
return decimals ? Math.floor(value * 10 ** decimals) / 10 ** decimals : Math.floor(value);
|
||||
}
|
||||
|
||||
export function roundToDecimal(
|
||||
|
|
Loading…
Reference in New Issue