Skip to content

Commit

Permalink
Catch failure that happens if no URL works (#4474)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Mar 10, 2025
1 parent 833e880 commit b4fb562
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/core/resultsStorage/pathToFolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export function pathToFolder(url, options, alias) {

const pathSegments = [];
const urlSegments = [];
pathSegments.push('pages', parsedUrl.hostname.split('.').join('_'));

// If a measurements fail and we use a script file and no URL
// has been tested, we don't have a hostname
if (parsedUrl.hostname) {
pathSegments.push('pages', parsedUrl.hostname.split('.').join('_'));
}

if (options.urlMetaData && options.urlMetaData[url]) {
pathSegments.push(options.urlMetaData[url]);
Expand Down

0 comments on commit b4fb562

Please sign in to comment.