@actual-app/api 25.3.0 → 25.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/bundle.api.js +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/app/bundle.api.js
CHANGED
|
@@ -54642,12 +54642,12 @@ CREATE TABLE kvcache_key (id INTEGER PRIMARY KEY, key REAL);
|
|
|
54642
54642
|
let integer, fraction;
|
|
54643
54643
|
// match the last dot or comma in the string
|
|
54644
54644
|
const match = currencyAmount.match(/[,.](?=[^.,]*$)/);
|
|
54645
|
-
if (!match || match[0] === getNumberFormat().thousandsSeparator && match.index + 4
|
|
54645
|
+
if (!match || match[0] === getNumberFormat().thousandsSeparator && match.index + 4 <= currencyAmount.length) {
|
|
54646
54646
|
fraction = null;
|
|
54647
|
-
integer = currencyAmount.replace(
|
|
54647
|
+
integer = currencyAmount.replace(/[^\d-]/g, '');
|
|
54648
54648
|
}
|
|
54649
54649
|
else {
|
|
54650
|
-
integer = currencyAmount.slice(0, match.index).replace(
|
|
54650
|
+
integer = currencyAmount.slice(0, match.index).replace(/[^\d-]/g, '');
|
|
54651
54651
|
fraction = currencyAmount.slice(match.index + 1);
|
|
54652
54652
|
}
|
|
54653
54653
|
const amount = parseFloat(integer + '.' + fraction);
|
package/dist/package.json
CHANGED