diff --git a/src/components/v2/MarkdownRender.vue b/src/components/v2/MarkdownRender.vue
index a93fdc212..1e964400c 100644
--- a/src/components/v2/MarkdownRender.vue
+++ b/src/components/v2/MarkdownRender.vue
@@ -19,18 +19,19 @@ const markdownToRender = computed(() => {
function captureClick(e: Event) {
if (e.target && e.target instanceof HTMLElement) {
if (e.target.tagName.toLowerCase() === "a") {
- if (e.target.getAttribute("href").startsWith("#")) {
- return e;
- } else {
+ const href = e.target.getAttribute("href") || "";
+ if (!href.startsWith("#")) {
+ e.preventDefault();
LinkProvider.instance.openLink(e.target.getAttribute("href")!);
}
}
}
+ return e;
}
-
+