diff --git a/components/layout/search/collection-link.tsx b/components/layout/search/collection-link.tsx index 2f9e3a667..d38e85880 100644 --- a/components/layout/search/collection-link.tsx +++ b/components/layout/search/collection-link.tsx @@ -7,10 +7,12 @@ const CollectionLink = async ({ anchorText, className }: { - collectionLinkId: string; + collectionLinkId?: string; anchorText: string; className?: string; }) => { + if (!collectionLinkId) return null; + const collection = await getCollection({ id: collectionLinkId }); if (!collection) return null; diff --git a/components/layout/search/header.tsx b/components/layout/search/header.tsx index 5dd9d0664..7059a48c3 100644 --- a/components/layout/search/header.tsx +++ b/components/layout/search/header.tsx @@ -12,7 +12,7 @@ const HelpfulLinks = async ({ ids }: { ids: string[] | null }) => { {links.map((link) => (