From b490664e7052a631e2919db628b94a01fb7abcfd Mon Sep 17 00:00:00 2001 From: ueiu <39592269+ueiu@users.noreply.github.com> Date: Mon, 21 Sep 2020 20:00:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Doutage.report=E8=BE=93?= =?UTF-8?q?=E5=87=BARSS=E6=8A=A5=E9=94=99=20(#5674)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/outagereport/service.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/outagereport/service.js b/lib/routes/outagereport/service.js index 4ed7cebac..5aef2cee4 100644 --- a/lib/routes/outagereport/service.js +++ b/lib/routes/outagereport/service.js @@ -26,7 +26,9 @@ module.exports = async (ctx) => { // list ("Array" in js, though) of items const outageHistory = []; - if (gaugeCount >= watchCount) { + // 2020-09-17 output as long as it exists, avoid reporting errors + // compatible with optional variables + if (watchCount !== 0) { // alert only when it counts const outageReportItem = { title: `${serviceName} appear to be (partially) down`,