From ba999c516aaf0ed0eca924f0e679775d13bf9845 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 2 Dec 2025 18:21:42 +0800 Subject: [PATCH] chore: Modify the default runtime value on the overview page (#11159) --- 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 aeef571a2..fa6132344 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);