Skip to content

Commit

Permalink
[v7] Remove _isEnabled in favor of direct options.enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Mar 23, 2021
1 parent a28268a commit fbaf00a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/core/src/baseclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,6 @@ export abstract class BaseClient<O extends OptionsV7> implements ClientLike<O> {
});
}

/** Determines whether this SDK is enabled and a valid Dsn is present. */
protected _isEnabled(): boolean {
return this.options.enabled !== false && this._dsn !== undefined;
}

/**
* Adds common information to events.
*
Expand Down Expand Up @@ -506,7 +501,7 @@ export abstract class BaseClient<O extends OptionsV7> implements ClientLike<O> {
// eslint-disable-next-line @typescript-eslint/unbound-method
const { beforeSend, sampleRate } = this.options;

if (!this._isEnabled()) {
if (this.options.enabled === false) {
return SyncPromise.reject(new SentryError('SDK not enabled, will not send event.'));
}

Expand Down

0 comments on commit fbaf00a

Please sign in to comment.