File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,13 @@ export class AsyncContextStack {
132
132
*/
133
133
function getAsyncContextStack ( ) : AsyncContextStack {
134
134
const registry = getMainCarrier ( ) ;
135
+
136
+ // For now we continue to keep this as `hub` on the ACS,
137
+ // as e.g. the Loader Script relies on this.
138
+ // Eventually we may change this if/when we update the loader to not require this field anymore
139
+ // Related, we also write to `hub` in {@link ./../sdk.ts registerClientOnGlobalHub}
135
140
const sentry = getSentryCarrier ( registry ) as { hub ?: AsyncContextStack } ;
136
141
137
- // If there's no hub, or its an old API, assign a new one
138
142
if ( sentry . hub ) {
139
143
return sentry . hub ;
140
144
}
Original file line number Diff line number Diff line change @@ -48,11 +48,11 @@ export function setCurrentClient(client: Client): void {
48
48
}
49
49
50
50
/**
51
- * Unfortunately, we still have to manually bind the client to the "hub" set on the global
51
+ * Unfortunately, we still have to manually bind the client to the "hub" property set on the global
52
52
* Sentry carrier object. This is because certain scripts (e.g. our loader script) obtain
53
53
* the client via `window.__SENTRY__.hub.getClient()`.
54
54
*
55
- * @see {@link hub. ts getGlobalHub }
55
+ * @see {@link ./asyncContext/stackStrategy. ts getAsyncContextStack }
56
56
*/
57
57
function registerClientOnGlobalHub ( client : Client ) : void {
58
58
const sentryGlobal = getSentryCarrier ( getMainCarrier ( ) ) as { hub ?: AsyncContextStack } ;
You can’t perform that action at this time.
0 commit comments