only print log if query matches
This commit is contained in:
@@ -18,8 +18,8 @@ export default {
|
|||||||
let currentPath = this.$router.history.current.path
|
let currentPath = this.$router.history.current.path
|
||||||
let reference = this.createReferenceTag(this.$props.title)
|
let reference = this.createReferenceTag(this.$props.title)
|
||||||
|
|
||||||
await this.$copyText(`https://webgems.io${currentPath}?card=${reference}`)
|
await this.$copyText(`https://webgems.io${currentPath}/?card=${reference}`)
|
||||||
this.$router.push(`${currentPath}?card=${reference}`)
|
this.$router.push(`${currentPath}/?card=${reference}`)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ export default {
|
|||||||
|
|
||||||
const query = this.$route.query.card
|
const query = this.$route.query.card
|
||||||
const title = this.createReferenceTag(this.$props.title)
|
const title = this.createReferenceTag(this.$props.title)
|
||||||
console.log(query, title, title === query? 'card--active': '')
|
if(title === query) console.log(query, title, title === query? 'card--active': '')
|
||||||
|
|
||||||
return title === query
|
return title === query
|
||||||
? 'card--active'
|
? 'card--active'
|
||||||
|
|||||||
Reference in New Issue
Block a user