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:
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user