Skip to content

Commit

Permalink
Bring back correct href for router-link links
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed Mar 23, 2023
1 parent 9339ace commit 1dd7b68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/NcAppNavigationItem/NcAppNavigationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Just set the `pinned` prop.
}"
class="app-navigation-entry-wrapper">
<component :is="isRouterLink ? 'router-link' : 'NcVNodes'"
v-slot="{ navigate, isActive }"
v-slot="{ href: href_router, navigate, isActive }"
:custom="isRouterLink ? true : false"
:to="to"
:exact="isRouterLink ? exact : null">
Expand All @@ -226,7 +226,7 @@ Just set the `pinned` prop.
class="app-navigation-entry-link"
:aria-description="ariaDescription"
:aria-expanded="opened.toString()"
:href="href || '#'"
:href="href || href_router || '#'"
:target="isExternal(href) ? '_blank' : ''"
:title="title || nameTitleFallback"
@blur="handleBlur"
Expand Down
4 changes: 2 additions & 2 deletions src/components/NcListItem/NcListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
<template>
<!-- This wrapper can be either a router link or a `<li>` -->
<component :is="to ? 'router-link' : 'NcVNodes'"
v-slot="{ navigate, isActive }"
v-slot="{ href: href_router, navigate, isActive }"
:custom="to ? true : null"
:to="to"
:exact="to ? exact : null"
Expand All @@ -209,7 +209,7 @@
:class="{ 'list-item__wrapper--active' : isActive }">
<a :id="anchorId"
ref="list-item"
:href="href"
:href="href_router || href"
:target="href === '#' ? undefined : '_blank'"
:rel="href === '#' ? undefined : 'noopener noreferrer'"
class="list-item"
Expand Down

0 comments on commit 1dd7b68

Please sign in to comment.