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(() => {
|
.then(() => {
|
||||||
const items = Object.values(uniqItems);
|
const items = Object.values(uniqItems);
|
||||||
|
if (items.length > 0) {
|
||||||
return {
|
return {
|
||||||
type: !!items.length && items.every(i => i.type === "roa") ? "roa" : "chain",
|
type: items.every(i => i.type === "roa") ? "roa" : "chain",
|
||||||
expiring: items.map(i => i.file)
|
expiring: items.map(i => i.file)
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user