mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-22 14:21:55 -05:00
fix(organization): filter null organizations in listUserInvitations (#8694)
Co-authored-by: Raihan Sharif <raihansharif.info@gmail.com>
This commit is contained in:
@@ -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