Fix non-profile urls not being usable.

This commit is contained in:
Phillip Thelen
2019-02-14 21:19:04 +01:00
parent 076e1b851e
commit af510ce86f

View File

@@ -195,10 +195,12 @@ export default {
const links = this.$refs.markdownContainer.getElementsByTagName('a');
for (let i = 0; i < links.length; i++) {
const link = links[i];
links[i].onclick = (ev) => {
ev.preventDefault();
this.$router.push({ path: link.getAttribute('href')});
};
if (links[i].getAttribute('href').startsWith('/profile/')) {
links[i].onclick = (ev) => {
ev.preventDefault();
this.$router.push({ path: link.getAttribute('href')});
};
}
}
},
methods: {