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'); const links = this.$refs.markdownContainer.getElementsByTagName('a');
for (let i = 0; i < links.length; i++) { for (let i = 0; i < links.length; i++) {
const link = links[i]; const link = links[i];
links[i].onclick = (ev) => { if (links[i].getAttribute('href').startsWith('/profile/')) {
ev.preventDefault(); links[i].onclick = (ev) => {
this.$router.push({ path: link.getAttribute('href')}); ev.preventDefault();
}; this.$router.push({ path: link.getAttribute('href')});
};
}
} }
}, },
methods: { methods: {