!path twice instead of checking for !path
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
In this conditional statement inside the if block, it is checking for !path twice instead of checking for !path and !heading. So, the corrected line should be:
if (!path || !heading) {
let listItem = null;
if (!path || !path || heading) {
// if current route item has no path and children treat it as an API sidebar heading
listItem = (
<SidebarRouteTree
level={level + 1}
isForceExpanded={isForceExpanded}
routeTree={{title, routes}}
breadcrumbs={[]}
/>
);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the SidebarRouteTree conditional shown in the issue and inspect its surrounding route-tree logic. Done means the condition checks for a missing path or missing heading, with the site's existing checks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- documentation, web-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100