Skip to content

Commit

Permalink
Add previous check to web vitals
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish committed Oct 31, 2022
1 parent f33301f commit b0cb4f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/tracing/src/browser/web-vitals/getCLS.ts
Expand Up @@ -61,6 +61,7 @@ export const onCLS = (onReport: ReportCallback, opts: ReportOpts = {}): void =>
// entry in the current session. Otherwise, start a new session.
if (
sessionValue &&
sessionEntries.length !== 0 &&
entry.startTime - lastSessionEntry.startTime < 1000 &&
entry.startTime - firstSessionEntry.startTime < 5000
) {
Expand Down

0 comments on commit b0cb4f6

Please sign in to comment.