Fixed javascript replaceAll issue for ES12- browser

This commit is contained in:
Cüneyt Şentürk 2023-02-23 17:28:20 +03:00
parent 3d3fbda128
commit 297ee6eba0

View File

@ -425,7 +425,9 @@ export default {
}
// 198.4
money = money.replace(this.currency.symbol, '').replaceAll(this.currency.thousands_separator, '').replace(this.currency.decimal_mark, '.');
let regex = new RegExp(this.currency.thousands_separator, 'gi');
money = money.replace(this.currency.symbol, '').replace(regex, '').replace(this.currency.decimal_mark, '.');
// "198.40"
money = parseFloat(money).toFixed(this.currency.precision);