Use Number.parseInt/parseFloat/isNaN/isFinite instead of globals (S7773)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 00:26:59 +08:00
co-authored by Claude Opus 4.6
parent 12068281e9
commit 3768c6e5ec
11 changed files with 27 additions and 27 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ export default function abbreviateNumber(totalSeconds) {
let result = "";
let symbols = ["d", "h", "m", "s"];
totalSeconds = parseInt(totalSeconds);
if (!isNaN(totalSeconds)) {
totalSeconds = Number.parseInt(totalSeconds);
if (!Number.isNaN(totalSeconds)) {
seconds = totalSeconds % 60;
minutes = (Math.floor(totalSeconds - seconds) / 60) % 60;
hours = Math.floor(totalSeconds / 3600) % 24;