Improve getObjectFromSeconds func

This commit is contained in:
x032205
2025-08-19 15:40:01 +08:00
parent 15d3638612
commit 57c667f0b1
+1 -5
View File
@@ -99,12 +99,8 @@ export const getObjectFromSeconds = (
return { value: totalSeconds / SECONDS_IN_MINUTE, unit: "m" }; return { value: totalSeconds / SECONDS_IN_MINUTE, unit: "m" };
} }
if (isUnitActive("s") && totalSeconds >= 1) {
return { value: totalSeconds, unit: "s" };
}
return { return {
value: 0, value: totalSeconds,
unit: "s" unit: "s"
}; };
}; };