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 e0fb856 commit 6cbe609Copy full SHA for 6cbe609
packages/core/src/carrier.ts
@@ -74,6 +74,8 @@ export function getGlobalSingleton<Prop extends keyof SentryCarrier>(
74
creator: () => NonNullable<SentryCarrier[Prop]>,
75
obj = GLOBAL_OBJ,
76
): NonNullable<SentryCarrier[Prop]> {
77
- const carrier = getSentryCarrier(obj);
+ const __SENTRY__ = (obj.__SENTRY__ = obj.__SENTRY__ || {});
78
+ const carrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});
79
+ // Note: We do not want to set `carrier.version` here, as this may be called before any `init` is called, e.g. for the default scopes
80
return carrier[name] || (carrier[name] = creator());
81
}
0 commit comments