Explorar el Código

Table: fix toFixed parameter overflow

Leopoldthecoder hace 8 años
padre
commit
48135c7c50
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/table/src/table-footer.js

+ 1 - 1
packages/table/src/table-footer.js

@@ -23,7 +23,7 @@ export default {
         sums[index] = values.reduce((prev, curr) => {
           const value = Number(curr);
           if (!isNaN(value)) {
-            return parseFloat((prev + curr).toFixed(precision));
+            return parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
           } else {
             return prev;
           }