File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,13 @@ export class AsyncContextStack {
132132 */
133133function getAsyncContextStack ( ) : AsyncContextStack {
134134 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}
135140 const sentry = getSentryCarrier ( registry ) as { hub ?: AsyncContextStack } ;
136141
137- // If there's no hub, or its an old API, assign a new one
138142 if ( sentry . hub ) {
139143 return sentry . hub ;
140144 }
Original file line number Diff line number Diff line change @@ -48,11 +48,11 @@ export function setCurrentClient(client: Client): void {
4848}
4949
5050/**
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
5252 * Sentry carrier object. This is because certain scripts (e.g. our loader script) obtain
5353 * the client via `window.__SENTRY__.hub.getClient()`.
5454 *
55- * @see {@link hub. ts getGlobalHub }
55+ * @see {@link ./asyncContext/stackStrategy. ts getAsyncContextStack }
5656 */
5757function registerClientOnGlobalHub ( client : Client ) : void {
5858 const sentryGlobal = getSentryCarrier ( getMainCarrier ( ) ) as { hub ?: AsyncContextStack } ;
You can’t perform that action at this time.
0 commit comments