fix: 修复outage.report输出RSS报错 (#5674)

This commit is contained in:
ueiu 2020-09-21 20:00:28 +08:00 committed by GitHub
parent a581fdd3ad
commit b490664e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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`,