Skip to content

Commit fbaf00a

Browse files
committed
[v7] Remove _isEnabled in favor of direct options.enabled
1 parent a28268a commit fbaf00a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: packages/core/src/baseclient.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,6 @@ export abstract class BaseClient<O extends OptionsV7> implements ClientLike<O> {
295295
});
296296
}
297297

298-
/** Determines whether this SDK is enabled and a valid Dsn is present. */
299-
protected _isEnabled(): boolean {
300-
return this.options.enabled !== false && this._dsn !== undefined;
301-
}
302-
303298
/**
304299
* Adds common information to events.
305300
*
@@ -506,7 +501,7 @@ export abstract class BaseClient<O extends OptionsV7> implements ClientLike<O> {
506501
// eslint-disable-next-line @typescript-eslint/unbound-method
507502
const { beforeSend, sampleRate } = this.options;
508503

509-
if (!this._isEnabled()) {
504+
if (this.options.enabled === false) {
510505
return SyncPromise.reject(new SentryError('SDK not enabled, will not send event.'));
511506
}
512507

0 commit comments

Comments
 (0)