Skip to content

Commit 60dd0a4

Browse files
authored
fix: respect empty rel and target (#2705)
1 parent 77c1b4d commit 60dd0a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/theme-default/components/VPLink.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const isExternal = computed(() => props.href && EXTERNAL_URL_RE.test(props.href)
2525
'no-icon': noIcon
2626
}"
2727
:href="href ? normalizeLink(href) : undefined"
28-
:target="target || (isExternal ? '_blank' : undefined)"
29-
:rel="rel || (isExternal ? 'noreferrer' : undefined)"
28+
:target="target ?? (isExternal ? '_blank' : undefined)"
29+
:rel="rel ?? (isExternal ? 'noreferrer' : undefined)"
3030
>
3131
<slot />
3232
</component>

0 commit comments

Comments
 (0)