Skip to content

Commit 77b4555

Browse files
[FSSDK-10880] logic update
1 parent 395e3c3 commit 77b4555

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/integration_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Checkout branch
1515
uses: actions/checkout@v3
1616
with:
17-
token: ${{ secrets.GITHUB_TOKEN }}`
17+
token: ${{ secrets.CI_USER_TOKEN || secrets.GITHUB_TOKEN }}`
1818
repository: 'optimizely/travisci-tools'
1919
path: 'home/runner/travisci-tools'
2020
ref: 'master'

src/Provider.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ export class OptimizelyProvider extends React.Component<OptimizelyProviderProps,
7474
// deprecation warning
7575
logger.warn('Passing userId and userAttributes as props is deprecated, please switch to using `user` prop');
7676
} else if (optimizely.user) {
77+
const { id, attributes } = optimizely.user;
7778
finalUser = {
78-
id: optimizely.user.id,
79-
attributes: optimizely.user.attributes || userAttributes || {},
79+
id,
80+
attributes: userAttributes || attributes || {},
8081
};
8182
} else {
8283
finalUser = {

0 commit comments

Comments
 (0)