File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,10 @@ export abstract class OdpManager implements IOdpManager {
258
258
return ;
259
259
}
260
260
261
+ if ( ! vuid && this . vuid ) {
262
+ vuid = this . vuid ;
263
+ }
264
+
261
265
this . eventManager . identifyUser ( userId , vuid ) ;
262
266
}
263
267
Original file line number Diff line number Diff line change @@ -181,28 +181,26 @@ export default class Optimizely implements Client {
181
181
this . eventProcessor = config . eventProcessor ;
182
182
183
183
const eventProcessorStartedPromise = this . eventProcessor . start ( ) ;
184
-
184
+
185
185
this . readyPromise = Promise . all ( [
186
186
projectConfigManagerReadyPromise ,
187
187
eventProcessorStartedPromise ,
188
188
config . odpManager ? config . odpManager . onReady ( ) : Promise . resolve ( ) ,
189
189
config . vuidManager ? config . vuidManager . configure ( this . vuidOptions ?? { enableVuid : false } ) : Promise . resolve ( ) ,
190
190
] ) . then ( promiseResults => {
191
- // Only return status from project config promise because event processor promise does not return any status.
192
- return promiseResults [ 0 ] ;
193
- } ) ;
194
-
195
- this . readyTimeouts = { } ;
196
- this . nextReadyTimeoutId = 0 ;
197
-
198
- this . onReady ( ) . then ( ( { success } ) => {
199
- if ( success ) {
191
+ // Only return status from project config promise because event processor promise does not return any status.
192
+ const result = promiseResults [ 0 ] ;
193
+ if ( result . success ) {
200
194
const vuid = this . vuidManager ?. vuid ;
201
195
if ( vuid ) {
202
196
this . odpManager ?. setVuid ( vuid ) ;
203
197
}
204
198
}
199
+ return result ;
205
200
} ) ;
201
+
202
+ this . readyTimeouts = { } ;
203
+ this . nextReadyTimeoutId = 0 ;
206
204
}
207
205
208
206
/**
You can’t perform that action at this time.
0 commit comments