Explorar o código

Fix issue where custom thousands separator was being over written

Josh Hanley %!s(int64=2) %!d(string=hai) anos
pai
achega
d0b91cb5af
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/mask/src/index.js

+ 1 - 1
packages/mask/src/index.js

@@ -164,7 +164,7 @@ export function buildUp(template, input) {
 }
 
 export function formatMoney(input, delimiter = '.', thousands) {
-    thousands = thousands ?? delimiter === "," ? "." : ","
+    thousands = thousands ?? (delimiter === "," ? "." : ",")
 
     let addThousands = (input, thousands) => {
         let output = ''