We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f9a3aa commit a821baeCopy full SHA for a821bae
frontend/src/utils/util.ts
@@ -57,11 +57,14 @@ export function getBrowserLang() {
57
}
58
59
export function loadUpTime(timeSince: string) {
60
+ if (!timeSince) {
61
+ return '';
62
+ }
63
const targetTime = new Date(timeSince);
64
const currentTime = new Date();
65
const uptime = (currentTime.getTime() - targetTime.getTime()) / 1000;
66
if (uptime <= 0) {
- return '-';
67
68
69
let days = Math.floor(uptime / 86400);
70
let hours = Math.floor((uptime % 86400) / 3600);
0 commit comments