diff --git a/package.json b/package.json index d7d1ca2..5a237e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eppo/js-client-sdk-common", - "version": "4.8.0", + "version": "4.8.1", "description": "Common library for Eppo JavaScript SDKs (web, react native, and node)", "main": "dist/index.js", "files": [ diff --git a/src/client/eppo-client.spec.ts b/src/client/eppo-client.spec.ts index f0bd5eb..707d567 100644 --- a/src/client/eppo-client.spec.ts +++ b/src/client/eppo-client.spec.ts @@ -766,9 +766,6 @@ describe('EppoClient E2E test', () => { it('Continues to poll when cache has not expired', async () => { class MockStore extends MemoryOnlyConfigurationStore { public static expired = false; - public isInitialized(): boolean { - return true; - } async isExpired(): Promise { return MockStore.expired; @@ -802,10 +799,6 @@ describe('EppoClient E2E test', () => { }); it('Does not fetch configurations if the configuration store is unexpired', async () => { class MockStore extends MemoryOnlyConfigurationStore { - public isInitialized(): boolean { - return true; - } - async isExpired(): Promise { return false; } diff --git a/src/client/eppo-client.ts b/src/client/eppo-client.ts index 29a2721..f59a749 100644 --- a/src/client/eppo-client.ts +++ b/src/client/eppo-client.ts @@ -218,10 +218,7 @@ export default class EppoClient { ); const pollingCallback = async () => { - if ( - !this.flagConfigurationStore.isInitialized() || - (await this.flagConfigurationStore.isExpired()) - ) { + if (await this.flagConfigurationStore.isExpired()) { return configurationRequestor.fetchAndStoreConfigurations(); } };