From 0a6fdcc79ae7d6aaef3e7b2ae91c035a1f6f421b Mon Sep 17 00:00:00 2001 From: aquananu <93096176+aquananu@users.noreply.github.com> Date: Sat, 1 Aug 2026 00:22:47 +0530 Subject: [PATCH] Update Cardsidebar.vue fix: Prevent TypeError crash on undefined currentCard Adds optional chaining to `newCard.id` and `oldCard.id` in the watcher of `CardSidebar.vue`. This prevents a UI crash (`TypeError: Cannot read properties of undefined (reading 'id')`) when the sidebar attempts to render a card that has been deleted or failed to load, causing `newCard` to be undefined. Signed-off-by: aquananu <93096176+aquananu@users.noreply.github.com> --- src/components/card/CardSidebar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index c162b8d90..516cd2c21 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -205,7 +205,7 @@ export default { }, watch: { currentCard(newCard, oldCard) { - if (newCard.id === oldCard?.id) return + if (newCard?.id === oldCard?.id) return this.focusHeader() }, 'currentCard.title': {