File tree 4 files changed +11
-9
lines changed
4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 34
34
"access" : " public"
35
35
},
36
36
"dependencies" : {
37
- "@optimizely/optimizely-sdk" : " ^5.3.0 " ,
37
+ "@optimizely/optimizely-sdk" : " ^5.3.2 " ,
38
38
"hoist-non-react-statics" : " ^3.3.0" ,
39
39
"prop-types" : " ^15.6.2" ,
40
40
"utility-types" : " ^2.1.0 || ^3.0.0"
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ describe('ReactSDKClient', () => {
79
79
getFeatureVariableString : jest . fn ( ( ) => null ) ,
80
80
getOptimizelyConfig : jest . fn ( ( ) => null ) ,
81
81
getProjectConfig : jest . fn ( ( ) => null ) ,
82
+ isOdpIntegrated : jest . fn ( ( ) => true ) ,
82
83
onReady : jest . fn ( ( ) => Promise . resolve ( { success : false } ) ) ,
83
84
close : jest . fn ( ) ,
84
85
getVuid : jest . fn ( ) ,
Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ export const DefaultUser: UserInfo = {
54
54
attributes : { } ,
55
55
} ;
56
56
57
- export interface ReactSDKClient extends Omit < optimizely . Client , 'createUserContext' | 'getProjectConfig' > {
57
+ export interface ReactSDKClient
58
+ extends Omit < optimizely . Client , 'createUserContext' | 'getProjectConfig' | 'isOdpIntegrated' > {
58
59
user : UserInfo ;
59
60
60
61
onReady ( opts ?: { timeout ?: number } ) : Promise < any > ;
@@ -364,14 +365,14 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
364
365
}
365
366
366
367
public async fetchQualifiedSegments ( options ?: optimizely . OptimizelySegmentOption [ ] ) : Promise < boolean > {
367
- if ( this . odpExplicitlyOff ) {
368
- return true ;
369
- }
370
-
371
368
if ( ! this . userContext ) {
372
369
return false ;
373
370
}
374
371
372
+ if ( this . odpExplicitlyOff || ! this . _client ?. isOdpIntegrated ( ) ) {
373
+ return true ;
374
+ }
375
+
375
376
return await this . userContext . fetchQualifiedSegments ( options ) ;
376
377
}
377
378
Original file line number Diff line number Diff line change 656
656
" @jridgewell/sourcemap-codec" " ^1.4.10"
657
657
658
658
" @optimizely/optimizely-sdk@^5.3.0 " :
659
- version "5.3.0 "
660
- resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-5.3.0 .tgz#dd1ca9d19287b31675d2f95c24234e074ade9a8b "
661
- integrity sha512-PzfjcApCvcHGir8XWSG3IBaOJXvPADjqpzXypEWTfArrONA3FlmqdnwDAlxF4b557fo/UZI6ZCyj3AWrG8cprg ==
659
+ version "5.3.2 "
660
+ resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-5.3.2 .tgz#4a4918485c9319b2237f6e32d901c3ff7e998051 "
661
+ integrity sha512-9d3sRusZfkN+CCq7C7DXp0bKam+dx2cDPPdcBQxLfwtTKFulzf6kGwnz4pVTtjwQ89vbJz10iJNMmD9qtSduPw ==
662
662
dependencies :
663
663
decompress-response "^4.2.1"
664
664
json-schema "^0.4.0"
You can’t perform that action at this time.
0 commit comments