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 4575321 commit 71fe56aCopy full SHA for 71fe56a
packages/core/src/sdk.ts
@@ -54,10 +54,10 @@ export function setCurrentClient(client: Client): void {
54
* @see {@link ./asyncContext/stackStrategy.ts getAsyncContextStack}
55
*/
56
function registerClientOnGlobalHub(client: Client): void {
57
- const sentryGlobal = getSentryCarrier(getMainCarrier());
58
try {
59
- sentryGlobal.stack.getStackTop().client = client;
60
- } catch {
61
- // ignore errors here
62
- }
+ // @ts-expect-error - purposefully not guarding the call here but try/catching for bundle size efficiency
+ getSentryCarrier(getMainCarrier()).stack.getStackTop().client = client;
+ } catch {
+ // ignore errors here
+ }
63
}
0 commit comments