diff --git a/src/ErrorBoundary.ts b/src/ErrorBoundary.ts index 02550f8..fcde535 100644 --- a/src/ErrorBoundary.ts +++ b/src/ErrorBoundary.ts @@ -80,6 +80,9 @@ export default class ErrorBoundary { error: unknown, { getExtraData, configName }: CaptureOptions = {} ): void { + if (this.sdkOptions.isAllLoggingDisabled()) { + return; + } (async () => { try { const extra = diff --git a/src/__tests__/ErrorBoundary.test.ts b/src/__tests__/ErrorBoundary.test.ts index 6628655..3559dc0 100644 --- a/src/__tests__/ErrorBoundary.test.ts +++ b/src/__tests__/ErrorBoundary.test.ts @@ -42,7 +42,6 @@ describe('ErrorBoundary', () => { beforeEach(() => { options = new StatsigSDKOptions({ api: 'www.google.com', - disableAllLogging: true, loggingBufferMaxSize: 2046, initializeValues: { feature_gates: [] }, userPersistentStorage: new FakeUserPersistentStorage(), @@ -125,7 +124,6 @@ describe('ErrorBoundary', () => { info: err.stack, statsigOptions: { api: 'www.google.com', - disableAllLogging: true, loggingBufferMaxSize: 2046, initializeValues: "set", userPersistentStorage: "set",