Skip to content

Commit

Permalink
Catch if the HAR miss the URL (#2160)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Jul 19, 2024
1 parent a5233d5 commit 009eab5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/core/engine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,13 @@ export class Engine {
) {
const fullyLoadedPerUrl = getFullyLoaded(extras.har);
for (let data of fullyLoadedPerUrl) {
collector.addFullyLoaded(data.url, data.fullyLoaded);
if (data.url === undefined) {
log.error(
'There is an page without an URL in the HAR. Please inspect the HAR file and check whats wrong'
);
} else {
collector.addFullyLoaded(data.url, data.fullyLoaded);
}
}

// Add the timings from the main document
Expand Down

0 comments on commit 009eab5

Please sign in to comment.