@crystaldesign/diva-utils 24.13.0-beta.9 → 24.13.0-rc.0
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/build/cjs/index.js +2 -2
- package/build/esm/index.js +2 -2
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -437,7 +437,7 @@ var DivaUtils = /*#__PURE__*/function () {
|
|
|
437
437
|
}, {
|
|
438
438
|
key: "formatPrice",
|
|
439
439
|
value: function formatPrice(price, priceFormat) {
|
|
440
|
-
if (price == undefined) return '';
|
|
440
|
+
if (price == undefined || isNaN(price)) return '';
|
|
441
441
|
var retPrice;
|
|
442
442
|
var priceFormatToUse = priceFormat ? priceFormat : this.defaultPriceFormat;
|
|
443
443
|
retPrice = format(price, priceFormatToUse);
|
|
@@ -1152,7 +1152,7 @@ var DivaError = /*#__PURE__*/function (_Error) {
|
|
|
1152
1152
|
if (Error.captureStackTrace) {
|
|
1153
1153
|
Error.captureStackTrace(_this, DivaError);
|
|
1154
1154
|
}
|
|
1155
|
-
_this.name
|
|
1155
|
+
_this.name = (_options$code = options === null || options === void 0 ? void 0 : options.code) !== null && _options$code !== void 0 ? _options$code : 'DivaError';
|
|
1156
1156
|
_this.custom = options === null || options === void 0 ? void 0 : options.custom;
|
|
1157
1157
|
return _this;
|
|
1158
1158
|
}
|
package/build/esm/index.js
CHANGED
|
@@ -419,7 +419,7 @@ var DivaUtils = /*#__PURE__*/function () {
|
|
|
419
419
|
}, {
|
|
420
420
|
key: "formatPrice",
|
|
421
421
|
value: function formatPrice(price, priceFormat) {
|
|
422
|
-
if (price == undefined) return '';
|
|
422
|
+
if (price == undefined || isNaN(price)) return '';
|
|
423
423
|
var retPrice;
|
|
424
424
|
var priceFormatToUse = priceFormat ? priceFormat : this.defaultPriceFormat;
|
|
425
425
|
retPrice = format(price, priceFormatToUse);
|
|
@@ -1134,7 +1134,7 @@ var DivaError = /*#__PURE__*/function (_Error) {
|
|
|
1134
1134
|
if (Error.captureStackTrace) {
|
|
1135
1135
|
Error.captureStackTrace(_this, DivaError);
|
|
1136
1136
|
}
|
|
1137
|
-
_this.name
|
|
1137
|
+
_this.name = (_options$code = options === null || options === void 0 ? void 0 : options.code) !== null && _options$code !== void 0 ? _options$code : 'DivaError';
|
|
1138
1138
|
_this.custom = options === null || options === void 0 ? void 0 : options.custom;
|
|
1139
1139
|
return _this;
|
|
1140
1140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-utils",
|
|
3
|
-
"version": "24.13.0-
|
|
3
|
+
"version": "24.13.0-rc.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"module": "build/esm/index.js",
|
|
25
25
|
"types": "./build/types/utils/src/index.d.ts",
|
|
26
26
|
"main": "build/cjs/index.js",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "3e3d13d7138c8d8e21f55a415a86a7772a13e6da"
|
|
28
28
|
}
|