diff --git a/packages/interface/src/utils/fetchProjects.ts b/packages/interface/src/utils/fetchProjects.ts index 43761ac4..243a900b 100644 --- a/packages/interface/src/utils/fetchProjects.ts +++ b/packages/interface/src/utils/fetchProjects.ts @@ -116,11 +116,9 @@ export async function fetchApprovedProjectsWithMetadata( const recipients = await Promise.all( response.map(async (request) => { const metadata = (await fetchMetadata(request.metadataUrl)) as unknown as Application; - if (search !== "") { - const name = metadata.name.toLowerCase(); - if (!name.includes(search.trim().toLowerCase())) { - return null; - } + const name = metadata.name.toLowerCase(); + if (search !== "" && !name.includes(search.trim().toLowerCase())) { + return null; } return { id: request.id,