mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 04:27:38 +00:00
Improve getObjectFromSeconds func
This commit is contained in:
@@ -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"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user