Skip to content

Commit

Permalink
Javascript sdk upgrade, odp integration public method addition
Browse files Browse the repository at this point in the history
  • Loading branch information
junaed-optimizely committed May 21, 2024
1 parent e5eef09 commit d2bb889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export const DefaultUser: UserInfo = {
attributes: {},
};

export interface ReactSDKClient extends Omit<optimizely.Client, 'createUserContext' | 'getProjectConfig'> {
export interface ReactSDKClient
extends Omit<optimizely.Client, 'createUserContext' | 'getProjectConfig' | 'isOdpIntegrated'> {
user: UserInfo;

onReady(opts?: { timeout?: number }): Promise<any>;
Expand Down Expand Up @@ -368,7 +369,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
return false;
}

if (this.odpExplicitlyOff || !this._client?.getProjectConfig()?.odpIntegrationConfig?.integrated) {
if (this.odpExplicitlyOff || !this._client?.isOdpIntegrated()) {
return true;
}

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,9 @@
"@jridgewell/sourcemap-codec" "^1.4.10"

"@optimizely/optimizely-sdk@^5.3.0":
version "5.3.0"
resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-5.3.0.tgz#dd1ca9d19287b31675d2f95c24234e074ade9a8b"
integrity sha512-PzfjcApCvcHGir8XWSG3IBaOJXvPADjqpzXypEWTfArrONA3FlmqdnwDAlxF4b557fo/UZI6ZCyj3AWrG8cprg==
version "5.3.2"
resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-5.3.2.tgz#4a4918485c9319b2237f6e32d901c3ff7e998051"
integrity sha512-9d3sRusZfkN+CCq7C7DXp0bKam+dx2cDPPdcBQxLfwtTKFulzf6kGwnz4pVTtjwQ89vbJz10iJNMmD9qtSduPw==
dependencies:
decompress-response "^4.2.1"
json-schema "^0.4.0"
Expand Down

0 comments on commit d2bb889

Please sign in to comment.