🐛 (moneypad) fix and make the multi currency works!
This commit is contained in:
@@ -23,12 +23,13 @@ export const moneypad = (
|
||||
): string => {
|
||||
const m = money(value, currency)
|
||||
const s: string[] = m.split('\xa0')
|
||||
const cur: string | undefined = s.pop()
|
||||
let cur: string | undefined = s.pop()
|
||||
|
||||
if (withPadEnd) {
|
||||
cur = (cur || '').padEnd(3, '\xa0')
|
||||
}
|
||||
|
||||
const result = `${s.join('\xa0')}\xa0${cur || ''}`
|
||||
if (withPadEnd) {
|
||||
return result.padEnd(3, '\xa0')
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user