From bbf1218e2f9a4d5dff40f79cc4351907148d022d Mon Sep 17 00:00:00 2001 From: Samaresh Kumar Singh Date: Thu, 18 Dec 2025 15:39:32 -0600 Subject: [PATCH] fix(handbook): handle empty maintainer links in repository-overview When a repository has a vacant maintainer position, the link array contains an empty string [''], causing Link components to render with empty 'to' props. This produces console errors about null page references. This fix adds conditional rendering to check if the maintainer link exists and is non-empty before rendering a Link component. When the link is empty, a plain span is rendered instead, preventing the null reference error. Fixes #6472 Signed-off-by: Samaresh Kumar Singh --- src/collections/handbook/repository-overview/index.mdx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/collections/handbook/repository-overview/index.mdx b/src/collections/handbook/repository-overview/index.mdx index ba531e8d4f03a..d4b99b14e1498 100644 --- a/src/collections/handbook/repository-overview/index.mdx +++ b/src/collections/handbook/repository-overview/index.mdx @@ -95,10 +95,13 @@ Note that the Layer5 community spans **six** GitHub organizations and **one** mu {language} {maintainers_name.map((mname, index) => { - return ( + const maintainerLink = link[index]; + return maintainerLink && maintainerLink.trim() !== "" ? ( {index > 0 ? ", " : ""}{mname} + ) : ( + {index > 0 ? ", " : ""}{mname} ); })} @@ -149,11 +152,14 @@ Note that the Layer5 community spans **six** GitHub organizations and **one** mu {description} {maintainers_name?.map((mname, index) => { - return ( + const maintainerLink = link[index]; + return maintainerLink && maintainerLink.trim() !== "" ? ( {index > 0 ? ", " : ""} {mname} + ) : ( + {index > 0 ? ", " : ""}{mname} ); })}