Skip to content

Commit

Permalink
Update src/onLCP.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
philipwalton committed Apr 29, 2024
1 parent a37cbe1 commit a6e80b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/onLCP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const onLCP = (onReport: LCPReportCallback, opts?: ReportOpts) => {
let report: ReturnType<typeof bindReporter>;

const handleEntries = (entries: LCPMetric['entries']) => {
// If reportAllChanges is set then call this function for each entry
// If reportAllChanges is set then call this function for each entry,
// As otherwise only want to emit the last one.
if (!opts!.reportAllChanges) {
entries = entries.slice(-1);
Expand Down

0 comments on commit a6e80b4

Please sign in to comment.