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 d5a332c commit f09760eCopy full SHA for f09760e
packages/browser-utils/src/metrics/inp.ts
@@ -93,7 +93,13 @@ function _trackINP(): () => void {
93
const replayId = replay && replay.getReplayId();
94
95
const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;
96
- const profileId = scope.getScopeData().contexts?.profile?.profile_id as string | undefined;
+ let profileId = undefined;
97
+ try {
98
+ // @ts-expect-error skip optional chaining to save bundle size with try catch
99
+ profileId = scope.getScopeData().contexts.profile.profile_id;
100
+ } catch {
101
+ // do nothing
102
+ }
103
104
const name = htmlTreeAsString(entry.target);
105
const attributes: SpanAttributes = dropUndefinedKeys({
0 commit comments