mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
fix: handle no value cases
This commit is contained in:
1 parent
277a1aec79
commit
4b2f20f384
2 files changed
+4
-4
No files matched your search
@@ -57,10 +57,10 @@ export async function sessionList() {
|
||||
user: user.username,
|
||||
quest,
|
||||
status,
|
||||
createdAt: createdAt.toLocaleString(),
|
||||
createdAt: createdAt?.toLocaleString(),
|
||||
finishedAt: finishedAt?.toLocaleString(),
|
||||
usedTime: finishedAt ? formatTime(finishedAt - createdAt) : '',
|
||||
commandCount: commands.length,
|
||||
commandCount: commands?.length,
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -38,10 +38,10 @@ export async function userList() {
|
||||
return {
|
||||
username,
|
||||
email,
|
||||
createdAt: createdAt.toLocaleString(),
|
||||
createdAt: createdAt?.toLocaleString(),
|
||||
method: loginMethods(userData),
|
||||
sessionCount: count,
|
||||
lastActivityAt: lastActivityAt.toLocaleString(),
|
||||
lastActivityAt: lastActivityAt?.toLocaleString(),
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user