Skip to content

Commit

Permalink
[FSSDK-10880] logic update
Browse files Browse the repository at this point in the history
  • Loading branch information
junaed-optimizely committed Nov 7, 2024
1 parent 395e3c3 commit 77b4555
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}`
token: ${{ secrets.CI_USER_TOKEN || secrets.GITHUB_TOKEN }}`
repository: 'optimizely/travisci-tools'
path: 'home/runner/travisci-tools'
ref: 'master'
Expand Down
5 changes: 3 additions & 2 deletions src/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ export class OptimizelyProvider extends React.Component<OptimizelyProviderProps,
// deprecation warning
logger.warn('Passing userId and userAttributes as props is deprecated, please switch to using `user` prop');
} else if (optimizely.user) {
const { id, attributes } = optimizely.user;
finalUser = {
id: optimizely.user.id,
attributes: optimizely.user.attributes || userAttributes || {},
id,
attributes: userAttributes || attributes || {},

Check warning on line 80 in src/Provider.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
};
} else {
finalUser = {
Expand Down

0 comments on commit 77b4555

Please sign in to comment.