Skip to content

Commit b5d3ee0

Browse files
committed
fix(snippets): open external link in markdown
1 parent 14b0f86 commit b5d3ee0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderer/components/markdown/TheMarkdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ const renderer = computed(() => getRenderer())
8484
8585
const openExternal = (e: Event) => {
8686
const el = e.target as HTMLAnchorElement
87+
e.preventDefault()
8788
if (el.classList.contains('external')) {
88-
e.preventDefault()
8989
ipc.invoke('main:open-url', el.href)
9090
}
9191
}

0 commit comments

Comments
 (0)