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:
@@ -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 => {
|
||||
|
||||
|
Reference in New Issue
Block a user