Skip to content

Commit

Permalink
fix: respect empty rel and target (#2705)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jul 29, 2023
1 parent 77c1b4d commit 60dd0a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/theme-default/components/VPLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const isExternal = computed(() => props.href && EXTERNAL_URL_RE.test(props.href)
'no-icon': noIcon
}"
:href="href ? normalizeLink(href) : undefined"
:target="target || (isExternal ? '_blank' : undefined)"
:rel="rel || (isExternal ? 'noreferrer' : undefined)"
:target="target ?? (isExternal ? '_blank' : undefined)"
:rel="rel ?? (isExternal ? 'noreferrer' : undefined)"
>
<slot />
</component>
Expand Down

0 comments on commit 60dd0a4

Please sign in to comment.