diff --git a/packages/nocodb-sdk/src/lib/helperFunctions.ts b/packages/nocodb-sdk/src/lib/helperFunctions.ts index 3d6374e9d9..194fec97c8 100644 --- a/packages/nocodb-sdk/src/lib/helperFunctions.ts +++ b/packages/nocodb-sdk/src/lib/helperFunctions.ts @@ -186,9 +186,9 @@ function roundUpToPrecision(number: number, precision: number = 0) { let pair = `${number}e`.split('e'); const value = Math.round(Number(`${pair[0]}e${+pair[1] + precision}`)); pair = `${value}e`.split('e'); - return +`${pair[0]}e${+pair[1] - precision}`; + return (+`${pair[0]}e${+pair[1] - precision}`).toFixed(precision); } - return Math.round(number); + return Math.round(number).toFixed(precision); } export {