From 2299b2846aa540bda36d4b42b438bd2f88e2f9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Weller?= Date: Thu, 16 May 2019 12:06:09 +0200 Subject: [PATCH] only print log if query matches --- components/Card.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/Card.vue b/components/Card.vue index 9339e8c..cbe558a 100644 --- a/components/Card.vue +++ b/components/Card.vue @@ -18,8 +18,8 @@ export default { 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); } @@ -34,7 +34,7 @@ export default { const query = this.$route.query.card 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 ? 'card--active'