Skip to content

Conversation

@ssam18
Copy link

@ssam18 ssam18 commented Dec 18, 2025

Description

When visiting the repository overview handbook page, console errors appear about null page references.

Root Cause

Several repositories in repo-data.js have vacant maintainer positions with empty string links (link: [""]). When these are rendered, the <Link to=""> component produces a null page reference error.

Solution

Added conditional rendering in the maintainer mapping function:

  • Check if the maintainer link exists and is non-empty
  • If valid, render a <Link> component as before
  • If empty/invalid, render a plain <span> element instead

This prevents the null reference error while still displaying the maintainer name ("Vacant") correctly.

Testing

  • Navigate to /community/handbook/repository-overview
  • Open browser console - no more null page reference errors
  • Vacant maintainer entries display correctly without being clickable links

Fixes #6472

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 layer5io#6472

Signed-off-by: Samaresh Kumar Singh <[email protected]>
@l5io
Copy link
Contributor

l5io commented Dec 18, 2025

🚀 Preview for commit bbf1218 at: https://694478428bfdfa2613af4052--layer5.netlify.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Handbook] Contains a "null" page reference

2 participants