Skip to content

Commit

Permalink
docs: improve NavLink cookbook (#7152)
Browse files Browse the repository at this point in the history
Bug Fix class "undefined" appended if no activeClass provided on active page
  • Loading branch information
Shane-Donlon authored Dec 13, 2024
1 parent 52b8ddb commit be18d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/docs/src/routes/docs/cookbook/nav-link/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const NavLink = component$(
return (
<Link
{...props}
class={`${props.class || ''} ${isActive ? activeClass : ''}`}
class={`${props.class || ''} ${isActive && activeClass ? activeClass : ''}`}

>
<Slot />
Expand Down

0 comments on commit be18d14

Please sign in to comment.