Skip to content

Commit

Permalink
UIU-3273: check if userId is present in withUserRoles HOC
Browse files Browse the repository at this point in the history
  • Loading branch information
aidynoJ committed Dec 2, 2024
1 parent d636e64 commit 77cb21a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Wrappers/withUserRoles.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const withUserRoles = (WrappedComponent) => (props) => {

useEffect(() => {
// eslint-disable-next-line react/prop-types
if (props.stripes.hasInterface('users-keycloak') && !isAllRolesDataLoading) {
if (props.stripes.hasInterface('users-keycloak') && !isAllRolesDataLoading && !!userId) {
api.get(
'roles/users', { searchParams },
)
Expand Down

0 comments on commit 77cb21a

Please sign in to comment.