diff --git a/theme/src/client/components/VPButton.vue b/theme/src/client/components/VPButton.vue index c3e9faba..58e26975 100644 --- a/theme/src/client/components/VPButton.vue +++ b/theme/src/client/components/VPButton.vue @@ -42,7 +42,7 @@ function linkTo(e: Event) { :is="component" class="vp-button" :class="[size, theme]" - :href="link?.[0] === '#' ? link : withBase(link || '')" + :href=" link ? link[0] === '#' || isExternal ? link : withBase(link) : undefined" :target="target ?? (isExternal ? '_blank' : undefined)" :rel="rel ?? (isExternal ? 'noreferrer' : undefined)" @click="linkTo($event)" diff --git a/theme/src/client/components/VPLink.vue b/theme/src/client/components/VPLink.vue index 9f520be4..2d703119 100644 --- a/theme/src/client/components/VPLink.vue +++ b/theme/src/client/components/VPLink.vue @@ -29,7 +29,7 @@ function linkTo(e: Event) {