RockteMQ-AI commented on code in PR #1682:
URL:
https://github.com/apache/rocketmq-dashboard/pull/1682#discussion_r3790507516
##########
web/src/components/MiniBar.tsx:
##########
@@ -32,13 +32,14 @@ const MiniBar = ({ data, color = '#1677ff', height = 32,
width = 120, label }: M
);
}
- const max = Math.max(...data, 1);
+ const normalizedData = data.map((value) => (Number.isFinite(value) ?
Math.max(0, value) : 0));
Review Comment:
**[Info]** Clean normalization approach. Using `Number.isFinite()` correctly
handles both `NaN` and `Infinity` in a single check. The aria-label update to
use normalized data is a nice accessibility improvement.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]