Skip to content

Commit

Permalink
[FSSDK-10730] isClientReady if config ready
Browse files Browse the repository at this point in the history
  • Loading branch information
junaed-optimizely committed Oct 4, 2024
1 parent caad5b2 commit 906faf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
});

this._client = optimizely.createInstance(configWithClientInfo);
this.isClientReady = !!this.getOptimizelyConfig();
this.isUsingSdkKey = !!configWithClientInfo.sdkKey;

if (this._client) {
Expand All @@ -249,7 +250,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
([userResult, clientResult]) => {
this.isClientReady = clientResult.success;
this.isUserReady = userResult.success;
const clientAndUserReady = this.isClientReady && this.isUserReady;
const clientAndUserReady = this.isReady();
this.clientAndUserReadyPromiseFulfilled = true;

return {
Expand Down

0 comments on commit 906faf3

Please sign in to comment.