From 6db5a130f2494fc44eb4d85611b58d384cf12a24 Mon Sep 17 00:00:00 2001 From: Raquel Smith Date: Thu, 15 Feb 2024 14:20:42 -0800 Subject: [PATCH] only get org invites if an org exists --- frontend/src/scenes/settings/organization/inviteLogic.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/scenes/settings/organization/inviteLogic.ts b/frontend/src/scenes/settings/organization/inviteLogic.ts index 0dabd3ec32807..5f6b05729d9d8 100644 --- a/frontend/src/scenes/settings/organization/inviteLogic.ts +++ b/frontend/src/scenes/settings/organization/inviteLogic.ts @@ -62,7 +62,9 @@ export const inviteLogic = kea([ [] 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}/`)