From 1bbd744d0285bcb5bda457165221a3da97bc79d3 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Fri, 7 Jan 2022 14:29:42 +0800 Subject: [PATCH] Chore: Improve syntax --- server/server.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/server.js b/server/server.js index 7db702a9f..821fccc7c 100644 --- a/server/server.js +++ b/server/server.js @@ -568,9 +568,7 @@ exports.entryPage = "dashboard"; } // Reset Prometheus labels - if (monitorList[monitor.id] && monitorList[monitor.id].prometheus()) { - monitorList[monitor.id].prometheus().remove(); - } + monitorList[monitor.id]?.prometheus()?.remove(); bean.name = monitor.name; bean.type = monitor.type;