Skip to content

Commit d5f9f9d

Browse files
authored
fix(replay): Fix types in WebVitalData (#13573)
Fixes attribution type: when adding an attribution in CLS we add {`value`, `nodeIds`} not {`value`, `sources`}
1 parent f5ef470 commit d5f9f9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/replay-internal/src/types/performance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export interface WebVitalData {
114114
/**
115115
* The layout shifts of a CLS metric
116116
*/
117-
attributions?: { value: number; sources?: number[] }[];
117+
attributions?: { value: number; nodeIds?: number[] }[];
118118
}
119119

120120
/**

packages/replay-internal/src/util/createPerformanceEntries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntr
198198
return getWebVital(metric, 'largest-contentful-paint', node);
199199
}
200200

201-
function isLayoutShift(entry: PerformanceEntry | LayoutShift): entry is LayoutShift {
201+
function isLayoutShift(entry: PerformanceEntry): entry is LayoutShift {
202202
return (entry as LayoutShift).sources !== undefined;
203203
}
204204

0 commit comments

Comments
 (0)