Skip to content

Commit

Permalink
[FSSDK-10980] log removal + comment improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
junaed-optimizely committed Dec 24, 2024
1 parent 8375101 commit 7713f4d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,14 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
this._client = optimizely.createInstance(configWithClientInfo);
this.isClientReady = !!this.getOptimizelyConfig();
this.isUsingSdkKey = !!configWithClientInfo.sdkKey;
console.log('I am in the constructor', this.isClientReady, this.isUsingSdkKey);

if (this._client) {
const clientReadyPromise = this._client.onReady();

this.clientAndUserReadyPromise = Promise.all([userReadyPromise, clientReadyPromise]).then(
([userResult, clientResult]) => {
this.isClientReady = clientResult.success;
this.isUserReady = userResult.success;
console.log('isClientReady', this.isClientReady);
console.log('isUserReady', this.isUserReady);
const clientAndUserReady = this.isReady();
this.clientAndUserReadyPromiseFulfilled = true;

Expand Down Expand Up @@ -384,7 +382,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
}

public async setUser(userInfo: UserInfo): Promise<void> {
// If user id is not present and ODP is explicitly off, user promise will be pending
// If user id is not present and ODP is explicitly off, user promise will be pending until setUser is called again with proper user id
if (userInfo?.id === null && this.odpExplicitlyOff) {
return;
}
Expand Down

0 comments on commit 7713f4d

Please sign in to comment.