added check for undefined

This commit is contained in:
7h3Rabbit 2025-02-22 20:49:22 +01:00
parent d37328103e
commit b6eb3a951c
1 changed files with 2 additions and 4 deletions

View File

@ -140,10 +140,6 @@ export class PageXrayAggregator {
}
}
summarizePerUrl(url) {
if (Object.keys(this.urls[url]).length === 0) {
return;
}
return this.summarizePerObject(this.urls[url]);
}
summarize() {
@ -165,6 +161,8 @@ export class PageXrayAggregator {
return summary;
}
summarizePerObject(type) {
if (!type) return {};
return Object.keys(type).reduce((summary, name) => {
if (
METRIC_NAMES.includes(name) ||