From 213c8c5f2f21e6834401f4ba070f8103f726c68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 5 Mar 2024 15:56:41 +0100 Subject: [PATCH] fix: Trigger local open card modal on the card actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/cards/CardMenuEntries.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/cards/CardMenuEntries.vue b/src/components/cards/CardMenuEntries.vue index 3d6734111..655154293 100644 --- a/src/components/cards/CardMenuEntries.vue +++ b/src/components/cards/CardMenuEntries.vue @@ -144,8 +144,14 @@ export default { }, methods: { openCard() { - const boardId = this.card?.boardId ? this.card.boardId : this.$route.params.id - this.$router.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {}) + const boardId = this.card?.boardId ? this.card.boardId : this.$route?.params.id ?? this.currentBoard.id + + if (this.$router) { + this.$router?.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {}) + return + } + + this.$root.$emit('open-card', this.card.id) }, deleteCard() { this.$store.dispatch('deleteCard', this.card)