Skip to content

Commit 192d068

Browse files
author
Lauren McCarthy
committed
Merge pull request #464 from darbicus/patch-1
fix for #462
2 parents db13207 + ece9642 commit 192d068

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/data/string_functions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ define(function (require) {
170170
var rem = dec !== -1 ? num.substring(dec) : '';
171171
var n = dec !== -1 ? num.substring(0, dec) : num;
172172
n = n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
173+
if (arguments[1] === 0) {
174+
rem = '';
175+
}
173176
if (arguments.length > 1) {
174177
rem = rem.substring(0, arguments[1]+1);
175178
}
@@ -298,4 +301,4 @@ define(function (require) {
298301

299302
return p5;
300303

301-
});
304+
});

0 commit comments

Comments
 (0)