Skip to content

Commit 47d821c

Browse files
committed
Should fix issue locutusjs#24: money_format wrongly formatting hundreds of thousands
1 parent 155a7d0 commit 47d821c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/strings/money_format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function money_format (format, number) {
8686
if (mon_grouping[0] < integer.length) {
8787
for (var i = 0, idx = integer.length; i < mon_grouping.length; i++) {
8888
idx -= mon_grouping[i]; // e.g., 3
89-
if (idx < 0) {
89+
if (idx <= 0) {
9090
break;
9191
}
9292
if (filler && idx < fillnum) {

0 commit comments

Comments
 (0)