diff --git a/packages/features/team-accounts/src/components/invitations/account-invitations-table.tsx b/packages/features/team-accounts/src/components/invitations/account-invitations-table.tsx index 8f55ffecb..a3c9c9acc 100644 --- a/packages/features/team-accounts/src/components/invitations/account-invitations-table.tsx +++ b/packages/features/team-accounts/src/components/invitations/account-invitations-table.tsx @@ -49,7 +49,10 @@ export function AccountInvitationsTable({ const filteredInvitations = invitations.filter((member) => { const searchString = search.toLowerCase(); - const email = member.email.split('@')[0]?.toLowerCase() ?? ''; + + const email = ( + member.email.split('@')[0]?.toLowerCase() ?? '' + ).toLowerCase(); return ( email.includes(searchString) || diff --git a/packages/features/team-accounts/src/components/members/account-members-table.tsx b/packages/features/team-accounts/src/components/members/account-members-table.tsx index 7fa1a2cc8..a01155ea7 100644 --- a/packages/features/team-accounts/src/components/members/account-members-table.tsx +++ b/packages/features/team-accounts/src/components/members/account-members-table.tsx @@ -78,7 +78,12 @@ export function AccountMembersTable({ const filteredMembers = members .filter((member) => { const searchString = search.toLowerCase(); - const displayName = member.name ?? member.email.split('@')[0]; + + const displayName = ( + member.name ?? + member.email.split('@')[0] ?? + '' + ).toLowerCase(); return ( displayName.includes(searchString) ||