Skip to content

Commit

Permalink
only get org invites if an org exists
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelmsmith committed Feb 15, 2024
1 parent 5951ec3 commit 6db5a13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/scenes/settings/organization/inviteLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export const inviteLogic = kea<inviteLogicType>([
[] as OrganizationInviteType[],
{
loadInvites: async () => {
return (await api.get('api/organizations/@current/invites/')).results
return organizationLogic.values.currentOrganization
? (await api.get('api/organizations/@current/invites/')).results
: []
},
deleteInvite: async (invite: OrganizationInviteType) => {
await api.delete(`api/organizations/@current/invites/${invite.id}/`)
Expand Down

0 comments on commit 6db5a13

Please sign in to comment.