diff --git a/src/components/Content/AppLink.vue b/src/components/Content/AppLink.vue index 050fd79..a241b12 100644 --- a/src/components/Content/AppLink.vue +++ b/src/components/Content/AppLink.vue @@ -4,7 +4,7 @@ import { RouterLink } from 'vue-router' const link = withDefaults( defineProps<{ - to: string + to: string | { name: string } label: string }>(), { @@ -16,10 +16,16 @@ const link = withDefaults( const isExternalLink = computed(() => { return typeof link.to === 'string' && link.to.startsWith('http') }) + +// Wrap in compute to suppress a warning. An external link will alway be a string +// because of the previous computed value. +const externalLink = computed((): string => { + return typeof link.to === 'string' ? link.to : '' +})