@widergy/utilitygo-smart-bill-web 3.24.3 → 3.24.4
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.24.4](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.24.3...v3.24.4) (2026-04-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* crash ([#90](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/90)) ([19b16e0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/19b16e081535e1082e307f91edadaf889d756556))
|
|
7
|
+
|
|
1
8
|
## [3.24.3](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.24.2...v3.24.3) (2026-04-14)
|
|
2
9
|
|
|
3
10
|
|
package/dist/components/SmartBillSummary/tabs/components/RateCard/components/ProgressBar/index.js
CHANGED
|
@@ -28,8 +28,8 @@ const ProgressBar = _ref => {
|
|
|
28
28
|
const {
|
|
29
29
|
LinearProgress
|
|
30
30
|
} = components;
|
|
31
|
-
const lastRange = data[data.length - 1]?.range[1];
|
|
32
|
-
const totalRange = lastRange === 'Infinity' ? data[data.length - 2]?.range[1] * 1.5 : lastRange;
|
|
31
|
+
const lastRange = data[data.length - 1]?.range?.[1];
|
|
32
|
+
const totalRange = lastRange === 'Infinity' ? (data[data.length - 2]?.range?.[1] ?? 0) * 1.5 : lastRange;
|
|
33
33
|
const progressOverlayValue = (0, _utils.getProgressOverlayValue)(specificRate, totalRange, value);
|
|
34
34
|
const isOverLimit = value > limitValue;
|
|
35
35
|
const {
|
|
@@ -63,6 +63,7 @@ const ProgressBar = _ref => {
|
|
|
63
63
|
range,
|
|
64
64
|
name
|
|
65
65
|
} = _ref2;
|
|
66
|
+
if (!Array.isArray(range)) return null;
|
|
66
67
|
const isLast = range[1] === 'Infinity';
|
|
67
68
|
const width = isLast ? '20%' : `${range[1] / totalRange * 100}%`;
|
|
68
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -87,7 +87,7 @@ const RateCard = _ref => {
|
|
|
87
87
|
let {
|
|
88
88
|
range
|
|
89
89
|
} = _ref4;
|
|
90
|
-
return range[1] >= totalConsumption;
|
|
90
|
+
return Array.isArray(range) && range[1] >= totalConsumption;
|
|
91
91
|
});
|
|
92
92
|
const currentRate = rates[currentIndex] ?? {};
|
|
93
93
|
const startRateValue = Array.isArray(currentRate?.range) && currentRate.range[0];
|