Skip to content

Commit

Permalink
fix: add judgement for last_report_time (#2551)
Browse files Browse the repository at this point in the history
  • Loading branch information
oil-oil authored Jul 29, 2022
1 parent 0b98833 commit 06a7118
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/src/pages/ServerInfo/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ const ServerInfo: React.FC = () => {
return {
...item,
boot_time: moment(item.boot_time * 1000).format('YYYY-MM-DD HH:mm:ss'),
last_report_time: moment(item.last_report_time * 1000).format('YYYY-MM-DD HH:mm:ss'),
...(item.last_report_time
? {
last_report_time: moment(item.last_report_time * 1000).format(
'YYYY-MM-DD HH:mm:ss',
),
}
: {}),
up_time: moment(item.boot_time * 1000)
.locale(locale)
.fromNow(true),
Expand Down

0 comments on commit 06a7118

Please sign in to comment.