mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 23:53:17 -05:00
fix(organization): filter null organizations in listUserInvitations (#8694)
Co-authored-by: Raihan Sharif <raihansharif.info@gmail.com>
This commit is contained in:
committed by
Bereket Engida
co-authored by
Raihan Sharif
parent
a0b53212aa
commit
a62cb044f4
@@ -930,9 +930,9 @@ export const getOrgAdapter = <O extends OrganizationOptions>(
|
||||
organization: true,
|
||||
},
|
||||
});
|
||||
return invitations.map(({ organization, ...inv }) => ({
|
||||
return invitations.filter(Boolean).map(({ organization, ...inv }) => ({
|
||||
...inv,
|
||||
organizationName: organization.name,
|
||||
organizationName: organization?.name,
|
||||
}));
|
||||
},
|
||||
createInvitation: async ({
|
||||
|
||||
Reference in New Issue
Block a user