Skip to content

Update Cardsidebar.vue fix: Prevent TypeError crash on undefined curr… - #8225

Open
aquananu wants to merge 1 commit into
nextcloud:mainfrom
aquananu:patch-2
Open

Update Cardsidebar.vue fix: Prevent TypeError crash on undefined curr…#8225
aquananu wants to merge 1 commit into
nextcloud:mainfrom
aquananu:patch-2

Conversation

@aquananu

Copy link
Copy Markdown

…entCard

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.

  • Resolves: #
  • Target version: main

Summary

TODO

  • ...

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

…entCard

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant