Skip to content

Commit

Permalink
Fix sidebar errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo committed Jul 8, 2024
1 parent ea34055 commit 21a422a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/shared/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export default function Sidebar({ onOpenChange }) {
event.preventDefault();

navigate(event.target.getAttribute('href'));
onOpenChange(false);

if (onOpenChange) {
onOpenChange(false);
}
},
[navigate, onOpenChange]
);
Expand Down

0 comments on commit 21a422a

Please sign in to comment.