Skip to content

□ fix sidebar crash when items have type but no href - #22

Merged
keypad merged 3 commits into
mainfrom
navcrash
Apr 6, 2026
Merged

□ fix sidebar crash when items have type but no href#22
keypad merged 3 commits into
mainfrom
navcrash

Conversation

@keypad

@keypad keypad commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

followup to #19

the sidebar discriminated items using "type" in item which breaks when docmeta items have a type field from schema extension (e.g. frontmatter type: "guide"), they fall into the sidebaritem branch and pass undefined href to navlink

this fixes the root cause by checking href presence instead of type presence, using type-safe guards (isfolder, issidebaritem) shared between sidebar and mobilenav

closes #21

@vercel

vercel Bot commented Apr 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fromsrc Ready Ready Preview, Comment Apr 6, 2026 3:33am

Request Review

@keypad
keypad merged commit eb60e10 into main Apr 6, 2026
3 checks passed
@keypad
keypad deleted the navcrash branch April 6, 2026 03:34
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.

sidebar crashes when items have type but no href

1 participant