Skip to content

Commit

Permalink
fix(link): invalid href prop, forgotten v-else
Browse files Browse the repository at this point in the history
Took 14 minutes
  • Loading branch information
Croos3r committed Jul 18, 2024
1 parent 05d7619 commit e0267fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/LLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ const open = ref(false);
</script>

<template>
<RouterLink v-if="href && href.startsWith('/')" :to="href">
<RouterLink v-if="$attrs.href && ($attrs.href as string).startsWith('/')" :to="$attrs.href">
<slot />
</RouterLink>
<AlertDialog v-model:open="open">
<AlertDialog v-else v-model:open="open">
<AlertDialogTrigger as-child>
<a>
<a class="cursor-pointer">
<slot />
</a>
</AlertDialogTrigger>
Expand Down

0 comments on commit e0267fa

Please sign in to comment.