Guard against no pages in the HAR (#4430)
This commit is contained in:
parent
5abff0c5ae
commit
65e3751a9f
|
|
@ -80,6 +80,8 @@ export class DomainsAggregator {
|
|||
if (this.groups[mainDomain] === undefined) {
|
||||
this.groups[mainDomain] = {};
|
||||
}
|
||||
|
||||
if (har.log.pages.length > 0) {
|
||||
const firstPageId = har.log.pages[0].id;
|
||||
|
||||
for (const entry of har.log.entries) {
|
||||
|
|
@ -101,7 +103,9 @@ export class DomainsAggregator {
|
|||
domain.totalTime.push(totalTime);
|
||||
groupDomain.totalTime.push(totalTime);
|
||||
} else {
|
||||
log.debug('Missing time from har entry for url: ' + entry.request.url);
|
||||
log.debug(
|
||||
'Missing time from har entry for url: ' + entry.request.url
|
||||
);
|
||||
}
|
||||
|
||||
for (const name of timingNames) {
|
||||
|
|
@ -116,6 +120,7 @@ export class DomainsAggregator {
|
|||
this.groups[mainDomain][domainName] = groupDomain;
|
||||
}
|
||||
}
|
||||
}
|
||||
summarize() {
|
||||
const summary = {
|
||||
groups: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue