Skip to content

Commit 3c047d3

Browse files
committed
fix: Properly undo card deletion in the frontend
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 911ed7a commit 3c047d3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/cards/CardMenuEntries.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ export default {
175175
},
176176
deleteCard() {
177177
this.$store.dispatch('deleteCard', this.card)
178-
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', this.card))
178+
const undoCard = { ...this.card, deletedAt: 0 }
179+
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', undoCard))
179180
},
180181
changeCardDoneStatus() {
181182
this.$store.dispatch('changeCardDoneStatus', { ...this.card, done: !this.card.done })

0 commit comments

Comments
 (0)