Skip to content

Commit

Permalink
Guard against disabling screenshots. (#4245)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jul 30, 2024
1 parent 4b8908e commit c325357
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions lib/plugins/browsertime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,18 +427,20 @@ export default class BrowsertimePlugin extends SitespeedioPlugin {
} else {
// Push all screenshots
run.screenshots = [];
for (let screenshot of result[resultIndex].files.screenshot[
runIndex
]) {
if (
screenshot.includes(
`${this.resultUrls.relativeSummaryPageUrl(
url,
this.allAlias[url]
)}data`
)
) {
run.screenshots.push(screenshot);
if (result[resultIndex].files.screenshot.length > 0) {
for (let screenshot of result[resultIndex].files.screenshot[
runIndex
]) {
if (
screenshot.includes(
`${this.resultUrls.relativeSummaryPageUrl(
url,
this.allAlias[url]
)}data`
)
) {
run.screenshots.push(screenshot);
}
}
}
}
Expand Down

0 comments on commit c325357

Please sign in to comment.