Skip to content

Commit 906faf3

Browse files
[FSSDK-10730] isClientReady if config ready
1 parent caad5b2 commit 906faf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
240240
});
241241

242242
this._client = optimizely.createInstance(configWithClientInfo);
243+
this.isClientReady = !!this.getOptimizelyConfig();
243244
this.isUsingSdkKey = !!configWithClientInfo.sdkKey;
244245

245246
if (this._client) {
@@ -249,7 +250,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
249250
([userResult, clientResult]) => {
250251
this.isClientReady = clientResult.success;
251252
this.isUserReady = userResult.success;
252-
const clientAndUserReady = this.isClientReady && this.isUserReady;
253+
const clientAndUserReady = this.isReady();
253254
this.clientAndUserReadyPromiseFulfilled = true;
254255

255256
return {

0 commit comments

Comments
 (0)