Skip to content

Commit 1c2f241

Browse files
committed
test: disable default trailing slash for external links
1 parent 07af3d2 commit 1c2f241

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/components/Link/Base.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ const props = withDefaults(
3636
/** should only be used for links where the context makes it very clear they are clickable. Don't just use this, because you don't like underlines. */
3737
noUnderline?: boolean
3838
39-
trailingSlash?: 'append' | 'remove' | undefined
39+
trailingSlash?: 'append' | 'remove' | undefined | null
4040
}>(),
41-
{ variant: 'link', size: 'medium', trailingSlash: 'append' },
41+
{ variant: 'link', size: 'medium' },
4242
)
4343
4444
const isLinkExternal = computed(
@@ -76,7 +76,7 @@ const isButtonMedium = computed(() => props.size === 'medium' && !isLink.value)
7676
<NuxtLink
7777
v-bind="props"
7878
v-else
79-
:trailing-slash="trailingSlash"
79+
:trailing-slash="isLinkExternal ? undefined : (trailingSlash ?? 'append')"
8080
class="group/link gap-x-1 items-center"
8181
:class="{
8282
'flex': block,

0 commit comments

Comments
 (0)