We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49c2bf7 commit 2ec6738Copy full SHA for 2ec6738
packages/browser-utils/src/metrics/cls.ts
@@ -88,7 +88,7 @@ export function trackClsAsStandaloneSpan(): void {
88
function sendStandaloneClsSpan(clsValue: number, entry: LayoutShift | undefined, pageloadSpanId: string) {
89
DEBUG_BUILD && logger.log(`Sending CLS span (${clsValue})`);
90
91
- const startTime = msToSec((browserPerformanceTimeOrigin() || 0) + (entry?.startTime || 0));
+ const startTime = msToSec((browserPerformanceTimeOrigin() || 0) + ((entry && entry.startTime) || 0));
92
const routeName = getCurrentScope().getScopeData().transactionName;
93
94
const name = entry ? htmlTreeAsString(entry.sources[0] && entry.sources[0].node) : 'Layout shift';
0 commit comments