This is an automated email from the ASF dual-hosted git repository.

guoqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 06a7118f fix: add judgement for last_report_time (#2551)
06a7118f is described below

commit 06a7118fa5ad2dac3b48d6ed289d49246046891e
Author: oil欧呦 <[email protected]>
AuthorDate: Fri Jul 29 14:03:57 2022 +0800

    fix: add judgement for last_report_time (#2551)
---
 web/src/pages/ServerInfo/List.tsx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/web/src/pages/ServerInfo/List.tsx 
b/web/src/pages/ServerInfo/List.tsx
index 63d6c5f3..99443ba4 100644
--- a/web/src/pages/ServerInfo/List.tsx
+++ b/web/src/pages/ServerInfo/List.tsx
@@ -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),

Reply via email to