From 3f9917dfab7aaf238de5ea09e60a44c611474deb Mon Sep 17 00:00:00 2001 From: dpschen Date: Sat, 2 Oct 2021 18:51:54 +0000 Subject: [PATCH] fix: vuex mutation error in edit list (#813) Co-authored-by: Dominik Pschenitschni Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/813 Reviewed-by: konrad Co-authored-by: dpschen Co-committed-by: dpschen --- src/views/list/settings/edit.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/list/settings/edit.vue b/src/views/list/settings/edit.vue index ab90017c..a6ea5086 100644 --- a/src/views/list/settings/edit.vue +++ b/src/views/list/settings/edit.vue @@ -71,7 +71,6 @@ import ListService from '@/services/list' import ColorPicker from '@/components/input/colorPicker.vue' import LoadingComponent from '@/components/misc/loading.vue' import ErrorComponent from '@/components/misc/error.vue' -import ListDuplicateService from '@/services/listDuplicateService' import {CURRENT_LIST} from '@/store/mutation-types' import CreateEdit from '@/components/misc/create-edit.vue' @@ -81,7 +80,6 @@ export default { return { list: ListModel, listService: new ListService(), - listDuplicateService: new ListDuplicateService(), } }, components: { @@ -106,9 +104,7 @@ export default { this.listService.get(list) .then(r => { - this.$set(this, 'list', r) - this.$store.commit(CURRENT_LIST, r) - this.setTitle(this.$t('list.edit.title', {list: this.list.title})) + this.list = { ...r } }) .catch(e => { this.$message.error(e) @@ -117,6 +113,8 @@ export default { save() { this.$store.dispatch('lists/updateList', this.list) .then(() => { + this.$store.commit(CURRENT_LIST, this.list) + this.setTitle(this.$t('list.edit.title', {list: this.list.title})) this.$message.success({message: this.$t('list.edit.success')}) this.$router.back() })