Skip to content

Commit

Permalink
Report wastedMs as 0 when maxDependencyEndTime > lcpTimingsBefore.end…
Browse files Browse the repository at this point in the history
…Time
  • Loading branch information
adamsilverstein authored Dec 5, 2024
1 parent 36cac18 commit 58c0c93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/audits/prioritize-lcp-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class PrioritizeLcpImage extends Audit {
}

const wastedMs = lcpTimingsBefore.endTime -
Math.max(lcpTimingsAfter.endTime, maxDependencyEndTime);
Math.max(lcpTimingsAfter.endTime, maxDependencyEndTime > lcpTimingsBefore.endTime ? lcpTimingsBefore.endTime : maxDependencyEndTime);

return {
wastedMs,
Expand Down

0 comments on commit 58c0c93

Please sign in to comment.