Skip to content

Commit a821bae

Browse files
committed
chore: Modify the default runtime value on the overview page
1 parent 1f9a3aa commit a821bae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/src/utils/util.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ export function getBrowserLang() {
5757
}
5858

5959
export function loadUpTime(timeSince: string) {
60+
if (!timeSince) {
61+
return '';
62+
}
6063
const targetTime = new Date(timeSince);
6164
const currentTime = new Date();
6265
const uptime = (currentTime.getTime() - targetTime.getTime()) / 1000;
6366
if (uptime <= 0) {
64-
return '-';
67+
return '';
6568
}
6669
let days = Math.floor(uptime / 86400);
6770
let hours = Math.floor((uptime % 86400) / 3600);

0 commit comments

Comments
 (0)