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

index 25a1d4c..5092b2f 100644 (file)
@@ -193,10 +193,12 @@ Roo.util.Format = function(){
             
             var r = /(\d+)(\d{3})/;
             // add comma's
-            while (r.test(whole)) {
-                whole = whole.replace(r, '$1' + thousandsDelimiter + '$2');
-            }
             
+            if(thousandsDelimiter.length != 0) {
+                while (r.test(whole)) {
+                    whole = whole.replace(r, '$1' + thousandsDelimiter + '$2');
+                }
+            } 
             
             var sub = ps[1] ?
                     // has decimals..