Skip to content

Commit 520b277

Browse files
fix(Link): ensure target _blank is flagged as external for Inertia (#4746)
Co-authored-by: Benjamin Canac <[email protected]>
1 parent d4592d1 commit 520b277

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/inertia/components/Link.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ const ui = computed(() => tv({
100100
const href = computed(() => props.to ?? props.href)
101101
102102
const isExternal = computed(() => {
103+
if (props.target === '_blank') {
104+
return true
105+
}
106+
103107
if (props.external) {
104108
return true
105109
}

0 commit comments

Comments
 (0)