From 0d8adf782db7ae5303cc7c0c0817c3167c223497 Mon Sep 17 00:00:00 2001 From: Romain Hamel Date: Sun, 4 May 2025 16:42:24 +0200 Subject: [PATCH] fix(inertia): always rendering an anchor tag --- src/runtime/inertia/components/Link.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/inertia/components/Link.vue b/src/runtime/inertia/components/Link.vue index 566d2e87..e4cf218f 100644 --- a/src/runtime/inertia/components/Link.vue +++ b/src/runtime/inertia/components/Link.vue @@ -110,14 +110,14 @@ const linkClass = computed(() => { }) const page = usePage() -const url = computed(() => props.to ?? props.href ?? '#') +const url = computed(() => props.to ?? props.href ?? '') -const isActive = computed(() => props.active || (props.exact ? url.value === props.href : page?.url.startsWith(url.value))) +const isActive = computed(() => props.active || (!!url.value && (props.exact ? url.value === props.href : page?.url.startsWith(url.value))))