From 3c047d3e21cfa9a93cd9c6287a02538b2c16b4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 17 Nov 2023 10:31:02 +0100 Subject: [PATCH] fix: Properly undo card deletion in the frontend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/cards/CardMenuEntries.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/cards/CardMenuEntries.vue b/src/components/cards/CardMenuEntries.vue index 687dd8e99..5e662d55f 100644 --- a/src/components/cards/CardMenuEntries.vue +++ b/src/components/cards/CardMenuEntries.vue @@ -175,7 +175,8 @@ export default { }, deleteCard() { this.$store.dispatch('deleteCard', this.card) - showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', this.card)) + const undoCard = { ...this.card, deletedAt: 0 } + showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', undoCard)) }, changeCardDoneStatus() { this.$store.dispatch('changeCardDoneStatus', { ...this.card, done: !this.card.done })