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