@skyux/core 8.10.3 → 8.10.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.
- package/esm2020/lib/modules/numeric/numeric.pipe.mjs +4 -1
- package/esm2020/lib/modules/numeric/numeric.service.mjs +2 -2
- package/fesm2015/skyux-core.mjs +4 -1
- package/fesm2015/skyux-core.mjs.map +1 -1
- package/fesm2020/skyux-core.mjs +4 -1
- package/fesm2020/skyux-core.mjs.map +1 -1
- package/lib/modules/numeric/numeric.pipe.d.ts +1 -1
- package/lib/modules/numeric/numeric.service.d.ts +1 -1
- package/package.json +2 -2
package/fesm2020/skyux-core.mjs
CHANGED
@@ -2121,7 +2121,7 @@ class SkyNumericService {
|
|
2121
2121
|
* @param options Format options.
|
2122
2122
|
*/
|
2123
2123
|
formatNumber(value, options) {
|
2124
|
-
if (
|
2124
|
+
if (value === undefined || value === null || isNaN(value)) {
|
2125
2125
|
return '';
|
2126
2126
|
}
|
2127
2127
|
const numericOptions = {
|
@@ -2299,6 +2299,9 @@ class SkyNumericPipe {
|
|
2299
2299
|
* Formats a number based on the provided options.
|
2300
2300
|
*/
|
2301
2301
|
transform(value, config) {
|
2302
|
+
if (value === undefined || value === null || isNaN(value)) {
|
2303
|
+
return '';
|
2304
|
+
}
|
2302
2305
|
const newCacheKey = (config ? JSON.stringify(config, Object.keys(config).sort()) : '') +
|
2303
2306
|
`${value}_${config?.locale || __classPrivateFieldGet(this, _SkyNumericPipe_providerLocale, "f")}`;
|
2304
2307
|
/* If the value and locale are the same as the last transform then return the previous value
|