Skip to content

Commit a8b0dc1

Browse files
authored
fix: When using enabled:false integrations shouldnt be installed (getsentry#2181)
1 parent 848c2a5 commit a8b0dc1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/core/src/baseclient.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
5353
protected readonly _dsn?: Dsn;
5454

5555
/** Array of used integrations. */
56-
protected readonly _integrations: IntegrationIndex;
56+
protected readonly _integrations: IntegrationIndex = {};
5757

5858
/** Is the client still processing a call? */
5959
protected _processing: boolean = false;
@@ -72,7 +72,9 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
7272
this._dsn = new Dsn(options.dsn);
7373
}
7474

75-
this._integrations = setupIntegrations(this._options);
75+
if (!options.enabled) {
76+
this._integrations = setupIntegrations(this._options);
77+
}
7678
}
7779

7880
/**

0 commit comments

Comments
 (0)