From 663fd9b35c416c73a100c5cb910f72e0572313a7 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 3f25d99dd9..92b027b6a8 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -179,7 +179,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)