From 283aa01fd4b624120553a9093e1643012e934eda Mon Sep 17 00:00:00 2001 From: Jakob Date: Fri, 30 Aug 2019 09:12:15 +0200 Subject: [PATCH] fix reload problem Signed-off-by: Jakob --- src/components/cards/CardItem.vue | 3 +-- src/router.js | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/cards/CardItem.vue b/src/components/cards/CardItem.vue index 331798f0a..c45b19bdb 100644 --- a/src/components/cards/CardItem.vue +++ b/src/components/cards/CardItem.vue @@ -100,8 +100,7 @@ export default { } }, currentCard() { - console.log(this.$route.params) - return this.$route.params.cardId == this.id + return this.$route.params.cardId === this.id } }, methods: { diff --git a/src/router.js b/src/router.js index e9d7cb60a..84ac149cb 100644 --- a/src/router.js +++ b/src/router.js @@ -107,6 +107,11 @@ export default new Router({ sidebar: CardSidebar }, props: { + default: (route) => { + return { + cardId: parseInt(route.params.cardId, 10) + } + }, sidebar: (route) => { return { id: parseInt(route.params.cardId, 10)