Roo/util/Format.js
authorjohn <john@roojs.com>
Mon, 11 Jun 2018 03:20:39 +0000 (11:20 +0800)
committerjohn <john@roojs.com>
Mon, 11 Jun 2018 03:20:39 +0000 (11:20 +0800)
Roo/util/Format.js

index f9ba0e7..01a2d81 100644 (file)
@@ -176,12 +176,10 @@ Roo.util.Format = function(){
         number : function(v,decimals)
         {
             // multiply and round.
-            if(decimals !== false) {
-                decimals = typeof(decimals) == 'undefined' ? 2 : decimals;
-                var mul = Math.pow(10, decimals);
-                var zero = String(mul).substring(1);
-                v = (Math.round((v-0)*mul))/mul;
-            }
+            decimals = typeof(decimals) == 'undefined' ? 2 : decimals;
+            var mul = Math.pow(10, decimals);
+            var zero = String(mul).substring(1);
+            v = (Math.round((v-0)*mul))/mul;
             
             // if it's '0' number.. then