Skip to content

Commit

Permalink
fix: collapse sidebar location match
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Aug 14, 2024
1 parent 27cfeb0 commit daab75e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilly-grapes-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vocs": patch
---

Fixed location match for collapsed sidebars.
2 changes: 1 addition & 1 deletion src/app/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function SidebarItem(props: {
)

const [collapsed, setCollapsed] = useState(() => {
if (match) return false
if (item.link && match) return false
if (!item.items) return false
if (hasActiveChildItem) return false
return Boolean(item.collapsed)
Expand Down

0 comments on commit daab75e

Please sign in to comment.