Skip to content

Commit

Permalink
fix: 🐛 update active class logic in Navbar component
Browse files Browse the repository at this point in the history
Co-authored-by: Félix Icaza <[email protected]>
  • Loading branch information
jagcruz and felixicaza committed Jul 13, 2024
1 parent 08fc1d0 commit 6fb03f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function isActiveSlug(slug: string) {
return (
normalizedPath === normalizedSlug ||
(normalizedPath === BASE_URL && normalizedSlug === '/') ||
normalizedSlug === '/' ||
(normalizedSlug !== '/' && normalizedPath.startsWith(normalizedSlug))
);
}
Expand Down

0 comments on commit 6fb03f2

Please sign in to comment.