8000 fix(tracing): Add an extra conditional check to web vitals `onCLS()` · yongdamsh/sentry-javascript@83ce1b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83ce1b8

Browse files
authored
fix(tracing): Add an extra conditional check to web vitals onCLS()
1 parent f33301f commit 83ce1b8

File tree

1 file changed

+1
-0
lines changed
  • packages/tracing/src/browser/web-vitals

1 file changed

+1
-0
lines changed

packages/tracing/src/browser/web-vitals/getCLS.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const onCLS = (onReport: ReportCallback, opts: ReportOpts = {}): void =>
6161
// entry in the current session. Otherwise, start a new session.
6262
if (
6363
sessionValue &&
64+
sessionEntries.length !== 0 &&
6465
entry.startTime - lastSessionEntry.startTime < 1000 &&
6566
entry.startTime - firstSessionEntry.startTime < 5000
6667
) {

0 commit comments

Comments
 (0)
0