yyqdbngt opened a new pull request, #2069:
URL: https://github.com/apache/rocketmq-dashboard/pull/2069

   ## What is the purpose of the change
   
   Fix #2064.
   
   formatBytes did not clamp the unit index and did not guard non-finite input. 
bytes beyond PB rendered an undefined unit (e.g. "1.2 undefined"), and 
NaN/Infinity rendered "NaN undefined".
   
   ## Brief changelog
   
   - formatBytes: guard non-finite input with '-', clamp to the largest unit 
with a division loop, and format the value against the clamped index
   
   ## How was this patch verified
   
   - npx vitest run src/utils/format.test.ts (4 passed)
   - npx tsc -b clean
   - npx eslint . clean
   


-- 
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]

Reply via email to