@stemy/ngx-utils 19.7.4 → 19.7.5

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.
@@ -3796,8 +3796,9 @@ class FormatterService {
3796
3796
  precision = this.getPrecision(precision);
3797
3797
  minDigits = minDigits ?? precision;
3798
3798
  divider = divider || this.defaultDivider;
3799
- const num = ObjectUtils.isNumber(value) ? value : parseFloat(value) || 0;
3800
- const str = (num / divider).toLocaleString(this.language.currentLanguage, {
3799
+ const num = (ObjectUtils.isNumber(value) ? value : parseFloat(value) ?? 0) / divider;
3800
+ const rounded = isNaN(num) ? 0 : MathUtils.round(0, 12);
3801
+ const str = rounded.toLocaleString(this.language.currentLanguage, {
3801
3802
  minimumFractionDigits: minDigits,
3802
3803
  maximumFractionDigits: precision,
3803
3804
  useGrouping: false