fix: add judgement for last_report_time (#2551)
diff --git a/web/src/pages/ServerInfo/List.tsx b/web/src/pages/ServerInfo/List.tsx
index 63d6c5f..99443ba 100644
--- a/web/src/pages/ServerInfo/List.tsx
+++ b/web/src/pages/ServerInfo/List.tsx
@@ -40,7 +40,13 @@
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),