Skip to content

Commit

Permalink
fix URL
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jan 15, 2024
1 parent 0e27ca0 commit 3f0acef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 1 addition & 5 deletions lib/plugins/pagexray/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ export default class PageXrayPlugin extends SitespeedioPlugin {
}
}
}
this.pageXrayAggregator.addToAggregate(
pageSummary,
group,
message.url
);
this.pageXrayAggregator.addToAggregate(pageSummary, group);
if (this.multi) {
// The HAR file can have multiple URLs
const sentURL = {};
Expand Down
11 changes: 6 additions & 5 deletions lib/plugins/pagexray/pagexrayAggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ export class PageXrayAggregator {
this.groups = {};
}

addToAggregate(pageSummary, group, url) {
addToAggregate(pageSummary, group) {
if (this.groups[group] === undefined) {
this.groups[group] = {};
}

if (this.urls[url] === undefined) {
this.urls[url] = {};
}

let stats = this.stats;
let groups = this.groups;

for (const summary of pageSummary) {
let url = summary.url;
if (this.urls[url] === undefined) {
this.urls[url] = {};
}

// stats for the whole page
for (const metric of METRIC_NAMES) {
// There's a bug in Firefox/https://github.com/devtools-html/har-export-trigger
Expand Down

0 comments on commit 3f0acef

Please sign in to comment.