From a821bae99ba5cc5285cd8592197bd9928a7dfebb Mon Sep 17 00:00:00 2001 From: ssongliu Date: Tue, 2 Dec 2025 18:08:47 +0800 Subject: [PATCH] chore: Modify the default runtime value on the overview page --- frontend/src/utils/util.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/utils/util.ts b/frontend/src/utils/util.ts index aeef571a2ff2..fa61323441c8 100644 --- a/frontend/src/utils/util.ts +++ b/frontend/src/utils/util.ts @@ -57,11 +57,14 @@ export function getBrowserLang() { } export function loadUpTime(timeSince: string) { + if (!timeSince) { + return ''; + } const targetTime = new Date(timeSince); const currentTime = new Date(); const uptime = (currentTime.getTime() - targetTime.getTime()) / 1000; if (uptime <= 0) { - return '-'; + return ''; } let days = Math.floor(uptime / 86400); let hours = Math.floor((uptime % 86400) / 3600);