From fbaf00a095cf866d7af1695c0c0a9eb36be8959d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Og=C3=B3rek?= Date: Mon, 22 Mar 2021 10:06:48 +0100 Subject: [PATCH] [v7] Remove _isEnabled in favor of direct options.enabled --- packages/core/src/baseclient.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/core/src/baseclient.ts b/packages/core/src/baseclient.ts index d4742011397a..2a27079c2ffe 100644 --- a/packages/core/src/baseclient.ts +++ b/packages/core/src/baseclient.ts @@ -295,11 +295,6 @@ export abstract class BaseClient implements ClientLike { }); } - /** 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. * @@ -506,7 +501,7 @@ export abstract class BaseClient implements ClientLike { // 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.')); }