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);