1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

consider case of 0 extra rpki stats

This commit is contained in:
Massimo Candela
2023-01-20 12:45:11 +01:00
parent ed1beb9e7f
commit 2a380031d4

View File

@@ -173,11 +173,14 @@ export default class MonitorROAS extends Monitor {
})
.then(() => {
const items = Object.values(uniqItems);
return {
type: !!items.length && items.every(i => i.type === "roa") ? "roa" : "chain",
expiring: items.map(i => i.file)
};
if (items.length > 0) {
return {
type: items.every(i => i.type === "roa") ? "roa" : "chain",
expiring: items.map(i => i.file)
};
} else {
return {};
}
})
.catch(error => {