Fix undo when marking a task as done
This commit is contained in:
parent
f9844384be
commit
30067935d1
1 changed files with 5 additions and 6 deletions
|
@ -170,7 +170,7 @@ export default {
|
|||
const updateFunc = () => {
|
||||
this.taskService.update(this.task)
|
||||
.then(t => {
|
||||
if(this.task.done) {
|
||||
if (this.task.done) {
|
||||
playPop()
|
||||
}
|
||||
this.task = t
|
||||
|
@ -180,11 +180,10 @@ export default {
|
|||
this,
|
||||
[{
|
||||
title: 'Undo',
|
||||
callback: () => this.markAsDone({
|
||||
target: {
|
||||
checked: !checked,
|
||||
},
|
||||
}),
|
||||
callback: () => {
|
||||
this.task.done = !this.task.done
|
||||
this.markAsDone(!checked)
|
||||
}
|
||||
}],
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue