From 7b8459c73a472145d00118e78bee6dcf06e951be Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Thu, 22 Jul 2021 16:13:58 +0800 Subject: [PATCH] Fix: use Optional chaining --- server/model/monitor.js | 2 +- src/pages/Details.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index ae409616a..f523dd4dd 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -81,7 +81,7 @@ class Monitor extends BeanModel { bean.ping = dayjs().valueOf() - startTime; // Check certificate if https is used - if (this.getUrl().protocol === "https:") { + if (this.getUrl()?.protocol === "https:") { await this.updateTlsInfo(checkCertificate(res)); } diff --git a/src/pages/Details.vue b/src/pages/Details.vue index a2952aa0a..6d93df399 100644 --- a/src/pages/Details.vue +++ b/src/pages/Details.vue @@ -54,7 +54,7 @@ -
+

Certificate Info