diff --git a/server/service/notificationService.js b/server/service/notificationService.js index 624056694..4b1ff6160 100755 --- a/server/service/notificationService.js +++ b/server/service/notificationService.js @@ -257,9 +257,7 @@ class NotificationService { const alerts = { cpu: cpuThreshold !== -1 && cpuUsage > cpuThreshold ? true : false, memory: memoryThreshold !== -1 && memoryUsage > memoryThreshold ? true : false, - disk: disk.some((d) => diskThreshold !== -1 && d.usage_percent > diskThreshold) - ? true - : false, + disk: disk?.some(d => diskThreshold !== -1 && d.usage_percent > diskThreshold) ?? false, }; const notifications = await this.db.getNotificationsByMonitorId(