diff --git a/server/model/monitor.js b/server/model/monitor.js index 5bcb2b103..2dfe2e65f 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1371,11 +1371,11 @@ class Monitor extends BeanModel { if (maintenance && await maintenance.isUnderMaintenance()) { return true; } + } - const parent = await Monitor.getParent(monitorID); - if (parent != null) { - return await Monitor.isUnderMaintenance(parent.id); - } + const parent = await Monitor.getParent(monitorID); + if (parent != null) { + return await Monitor.isUnderMaintenance(parent.id); } return false;