Skip to content

Commit

Permalink
fix: dont return homeorg when in pending status
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Oct 11, 2023
1 parent bf37ef2 commit 7f828a4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/api/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,13 @@ const getHomeOrg = async () => {
(key) => response.body[key]
);

return orgArray.find((org) => org.isHome) || null;
const homeOrg = orgArray.find((org) => org.isHome) || null;

if (homeOrg.orgUid === 'PENDING') {
return null;
}

return homeOrg;
} catch (error) {
logger.error(`Could not get home org: ${error.message}`);

Expand Down

0 comments on commit 7f828a4

Please sign in to comment.