Skip to content

sidebar crashes when items have type but no href #21

Description

@keypad

navlink throws on href.startsWith("http") when href is undefined

the sidebar uses "type" in item to split docmeta from sidebaritem, but this breaks when docmeta items have a type field from schema extension (e.g. frontmatter type: "guide"), they fall into the sidebaritem branch which passes undefined href to navlink

fix should check for href presence instead of type presence in the sidebar rendering logic, same issue exists in mobilenav and folder

pr #19 masks this by falling back href to "#" in navlink, which creates silent dead links

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions