@tetacom/ng-components 1.0.62 → 1.0.63
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/esm2020/pipe/number-pipe/number.pipe.mjs +4 -4
- package/fesm2015/tetacom-ng-components.mjs +3 -3
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +3 -3
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/pipe/number-pipe/number.pipe.d.ts +1 -1
|
@@ -6600,13 +6600,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
6600
6600
|
|
|
6601
6601
|
class NumberPipe {
|
|
6602
6602
|
transform(value, decimalLength = 2, chunkDelimiter = '', decimalDelimiter = '.', chunkLength = 3) {
|
|
6603
|
-
if (value === null || value === undefined) {
|
|
6603
|
+
if (value === null || value === undefined || value === '') {
|
|
6604
6604
|
return '';
|
|
6605
6605
|
}
|
|
6606
|
-
if (value
|
|
6606
|
+
if (typeof value === 'string' && isNaN(parseFloat(value))) {
|
|
6607
6607
|
return value.toString();
|
|
6608
6608
|
}
|
|
6609
|
-
value
|
|
6609
|
+
value = Number(value);
|
|
6610
6610
|
return formatNumber(value, decimalLength, chunkDelimiter, decimalDelimiter, chunkLength);
|
|
6611
6611
|
}
|
|
6612
6612
|
}
|