Skip to content

Commit

Permalink
fix(Link): handle active override when value is false
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Dec 14, 2023
1 parent 0f9b5d4 commit 83631cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/components/elements/Link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:role="disabled ? 'link' : undefined"
:rel="rel"
:target="target"
:class="active ? activeClass : resolveLinkClass(route, $route, { isActive, isExactActive })"
:class="active !== undefined ? (active ? activeClass : inactiveClass) : resolveLinkClass(route, $route, { isActive, isExactActive })"
@click="(e) => !isExternal && navigate(e)"
>
<slot v-bind="{ isActive: exact ? isExactActive : isActive }" />
Expand All @@ -48,7 +48,7 @@ export default defineComponent({
},
active: {
type: Boolean,
default: false
default: undefined
},
exact: {
type: Boolean,
Expand Down

1 comment on commit 83631cc

@vercel
Copy link

@vercel vercel bot commented on 83631cc Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui-git-dev-nuxt-js.vercel.app
ui.nuxt.com
ui-nuxt-js.vercel.app

Please sign in to comment.