60p82u21t54k 1.0.20 → 1.0.21

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.
@@ -4232,7 +4232,7 @@ const getFormattedAmount = (value, decimalPlaces = 2) => {
4232
4232
  }
4233
4233
  const formattedZero = `0${decimalPlaces ? "." + "0".repeat(decimalPlaces) : ""}`;
4234
4234
  const parsedValue = parseFloat(value);
4235
- if (isNaN(parsedValue) || typeof value === "string" && /[^\d.,]/.test(value)) {
4235
+ if (isNaN(parsedValue) || typeof value === "string" && !/^-?[\d.,]+$/.test(value)) {
4236
4236
  return `${formattedZero}`;
4237
4237
  }
4238
4238
  return `${parsedValue.toFixed(decimalPlaces).replace(/\B(?=(\d{3})+(?!\d))/g, ",")}`;