Skip to content

Commit

Permalink
Merge pull request #9756 from marmelab/fix-use-get-identity
Browse files Browse the repository at this point in the history
Fix `useGetIdentity` regression
  • Loading branch information
fzaninotto authored Apr 5, 2024
2 parents 9af5512 + 0682d1f commit fd2ca41
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/ra-core/src/auth/useGetIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ export const useGetIdentity = (
authProvider &&
typeof authProvider.getIdentity === 'function'
) {
const identity = await authProvider.getIdentity();
return identity || defaultIdentity;
return authProvider.getIdentity();
} else {
return defaultIdentity;
}
},

{
enabled: typeof authProvider?.getIdentity === 'function',
...queryParams,
Expand Down

0 comments on commit fd2ca41

Please sign in to comment.