diff --git a/index.js b/index.js index 7a658d4..97403bb 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ kuma.status(process.env.STATUSPAGE).then((status) => { for (let monitor of x.monitors) { totalCount++; // Increment total services count // Check if the service is online - if (monitor.heartbeats[0].status) { + if (monitor.heartbeats.slice().status) { onlineCount++; // Increment online services count } else { offline.push(monitor.name)