From 701a46ecd4e5b6dfb7dbd308b46a876b663abf61 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 26 Mar 2020 20:01:05 +0100 Subject: [PATCH] Fix updating a task with repeat after interval from list view (Fixes #75) --- src/components/tasks/reusable/singleTaskInList.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/tasks/reusable/singleTaskInList.vue b/src/components/tasks/reusable/singleTaskInList.vue index 658ca2bd..aa364ad0 100644 --- a/src/components/tasks/reusable/singleTaskInList.vue +++ b/src/components/tasks/reusable/singleTaskInList.vue @@ -82,14 +82,12 @@ let updateFunc = () => { // We get the task, update the 'done' property and then push it to the api. this.task.done = e.target.checked - let task = new TaskModel(this.task) - task.done = e.target.checked - this.taskService.update(task) + this.taskService.update(this.task) .then(t => { this.task = t this.$emit('taskUpdated', t) this.success( - {message: 'The task was successfully ' + (task.done ? '' : 'un-') + 'marked as done.'}, + {message: 'The task was successfully ' + (this.task.done ? '' : 'un-') + 'marked as done.'}, this, [{ title: 'Undo',