Skip to content

Commit

Permalink
fix: avoid dispatching if orgUnitId is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
superskip committed Oct 20, 2023
1 parent 9c20251 commit 0c7d2f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function useCoreOrgUnit(orgUnitId: string): {
return { error: { groupError, errorComponent } };
}

if (orgUnit && orgUnitGroups) {
if (orgUnitId && orgUnit && orgUnitGroups) {
const { displayName, ...restOrgUnit } = orgUnit;
const coreOrgUnit = {
...restOrgUnit,
Expand Down

0 comments on commit 0c7d2f9

Please sign in to comment.