Commit 859d60e7 authored by Zéfling's avatar Zéfling 🎨
Browse files

Error on calculating digital groups

parent 1800dbd4
......@@ -24,7 +24,10 @@ baku.number = {
unit = match[3];
// digit grouping
groupingSize = number.match(/,?([#]*[0]*)$/)[1].length;
var numberMatch = number.match(/,([#]*[0]*)$/);
if (numberMatch) {
groupingSize = numberMatch[1].length;
}
zeroDigitSize = number.match(/[,0]*$/)[0].replace(/,/g, '').length;
// decimal
if (decimal) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment