From 77cb21ad7a48f26b16244d48b8392c92616fcd2c Mon Sep 17 00:00:00 2001 From: aidynoJ Date: Mon, 2 Dec 2024 12:37:27 +0500 Subject: [PATCH] UIU-3273: check if userId is present in withUserRoles HOC --- src/components/Wrappers/withUserRoles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Wrappers/withUserRoles.js b/src/components/Wrappers/withUserRoles.js index ae8bbb595..a25317728 100644 --- a/src/components/Wrappers/withUserRoles.js +++ b/src/components/Wrappers/withUserRoles.js @@ -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 }, )