Skip to content

Commit

Permalink
need to return on error instead of creating a suborg
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-dev committed Feb 13, 2025
1 parent e7a3913 commit 10472cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sdk-react/src/components/auth/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const Auth: React.FC<AuthProps> = ({
!getVerifiedSuborgsResponse.organizationIds
) {
onError(authErrors.suborg.fetchFailed);
return
return;
}
suborgId = getVerifiedSuborgsResponse?.organizationIds[0];
} else {
Expand All @@ -152,7 +152,7 @@ const Auth: React.FC<AuthProps> = ({
});
if (!getSuborgsResponse || !getSuborgsResponse.organizationIds) {
onError(authErrors.suborg.fetchFailed);
return
return;
}
suborgId = getSuborgsResponse?.organizationIds[0];
}
Expand Down

0 comments on commit 10472cb

Please sign in to comment.