From fb5d2b90b6214afd9b4d6f969e6a54bfb8b2276b 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 81f097e2d6..02d264c995 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)