Skip to content

Commit 81c2ea8

Browse files
authored
Revert "fix: check that config store is initialized before skipping fetch", bump to v4.8.1 (#199)
* Revert "fix: check that config store is initialized when considering to skip …" * bump version to 4.8.1 This reverts commit 940d210.
1 parent 247ec29 commit 81c2ea8

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eppo/js-client-sdk-common",
3-
"version": "4.8.0",
3+
"version": "4.8.1",
44
"description": "Common library for Eppo JavaScript SDKs (web, react native, and node)",
55
"main": "dist/index.js",
66
"files": [

src/client/eppo-client.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,6 @@ describe('EppoClient E2E test', () => {
766766
it('Continues to poll when cache has not expired', async () => {
767767
class MockStore<T> extends MemoryOnlyConfigurationStore<T> {
768768
public static expired = false;
769-
public isInitialized(): boolean {
770-
return true;
771-
}
772769

773770
async isExpired(): Promise<boolean> {
774771
return MockStore.expired;
@@ -802,10 +799,6 @@ describe('EppoClient E2E test', () => {
802799
});
803800
it('Does not fetch configurations if the configuration store is unexpired', async () => {
804801
class MockStore<T> extends MemoryOnlyConfigurationStore<T> {
805-
public isInitialized(): boolean {
806-
return true;
807-
}
808-
809802
async isExpired(): Promise<boolean> {
810803
return false;
811804
}

src/client/eppo-client.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,7 @@ export default class EppoClient {
218218
);
219219

220220
const pollingCallback = async () => {
221-
if (
222-
!this.flagConfigurationStore.isInitialized() ||
223-
(await this.flagConfigurationStore.isExpired())
224-
) {
221+
if (await this.flagConfigurationStore.isExpired()) {
225222
return configurationRequestor.fetchAndStoreConfigurations();
226223
}
227224
};

0 commit comments

Comments
 (0)