fix routing issue?

This commit is contained in:
André Weller
2019-06-15 00:17:58 +02:00
parent 2fbe4bfb23
commit b68b2f7389
2 changed files with 5 additions and 4 deletions

View File

@@ -15,10 +15,11 @@ export default {
async createCopyUrl() {
try {
let currentPath = this.$router.history.current.path
let reference = this.createReferenceTag(this.$props.title)
await this.$copyText(`https://webgems.io${currentPath}?card=${reference}`)
this.$router.push(`${currentPath}?card=${reference}`)
await this.$copyText(`https://webgems.io${currentPath}/?card=${reference}`)
this.$router.push(`${currentPath}/?card=${reference}`)
} catch (e) {
console.error(e);
}
@@ -37,7 +38,7 @@ export default {
? 'card--active'
: ''
}
}
},
},
}
</script>