Skip to content

Commit 9e1d606

Browse files
[FSSDK-11098] setTimeout issue in akamai edge worker fix
1 parent 973cbf7 commit 9e1d606

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/index.browser.tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ describe('javascript-sdk (Browser)', function() {
584584
const fakeOptimizely = {
585585
onReady: () => Promise.resolve({ success: true }),
586586
identifyUser: sinon.stub().returns(),
587+
isOdpIntegrated: sinon.stub().returns(true)
587588
};
588589

589590
const fakeErrorHandler = { handleError: function() {} };

lib/optimizely_user_context/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default class OptimizelyUserContext implements IOptimizelyUserContext {
6363
this.attributes = { ...attributes } ?? {};
6464
this.forcedDecisionsMap = {};
6565

66-
if (shouldIdentifyUser) {
66+
if (shouldIdentifyUser && optimizely.isOdpIntegrated()) {
6767
this.optimizely.onReady().then(({ success }) => {
6868
if (success) {
6969
this.identifyUser();

0 commit comments

Comments
 (0)