Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tunetheweb committed Aug 30, 2024
1 parent 2e3bb83 commit 7e86a73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/attribution/onLCP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ const attributeLCP = (metric: LCPMetric): LCPMetricWithAttribution => {
: 0,
);
const lcpResponseEnd = Math.min(
// Cap at LCP time (videos continue downloading after LCP for example)
lcpEntry.startTime - activationStart,
Math.max(
lcpRequestStart,
lcpResourceEntry ? lcpResourceEntry.responseEnd - activationStart : 0,
),
// Cap at LCP time (videos continue downloading after LCP for example)
lcpEntry.startTime - activationStart,
);
const lcpRenderTime = Math.max(
lcpResponseEnd,
Expand Down

0 comments on commit 7e86a73

Please sign in to comment.