From dbb3da1101c99cb42725287bd6b1659b14f126cf Mon Sep 17 00:00:00 2001 From: silver Date: Mon, 20 Oct 2025 17:39:40 +0200 Subject: [PATCH] fix: prevent error when $route is undefined by using optional chaining Signed-off-by: silver --- src/components/board/Board.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/board/Board.vue b/src/components/board/Board.vue index 0e83fd627d..bcefaf7c27 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -182,7 +182,7 @@ export default { await this.$store.dispatch('loadBoardById', this.id) await this.$store.dispatch('loadStacks', this.id) - const routeCardId = parseInt(this.$route.params.cardId) + const routeCardId = this.$route?.params?.cardId ? parseInt(this.$route.params.cardId) : null // If an archived card is requested, and we cannot find it in the current we load the archived stacks instead if (routeCardId && !this.$store.getters.cardById(routeCardId)) { await this.$store.dispatch('loadArchivedStacks', this.id)