Fix .toFixed() string-to-number comparison by wrapping with Number()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 18:05:01 +08:00
parent b6499020c6
commit 86e08b7146
7 changed files with 7 additions and 7 deletions

View File

@@ -340,7 +340,7 @@ const secondaryStatData = ref(null);
* @returns {number} The percentage value.
*/
const getPercentLabel = (val) => {
if ((val * 100).toFixed(1) >= 100) return 100;
if (Number((val * 100).toFixed(1)) >= 100) return 100;
else return parseFloat((val * 100).toFixed(1));
};