fix(task creation): correctly clone selected tags array, fixes #12447

This commit is contained in:
Matteo Pagliazzi 2020-09-08 12:52:09 +02:00
parent 78016c0aeb
commit 96d22e54f8
2 changed files with 2 additions and 2 deletions

View file

@ -608,7 +608,7 @@ export default {
const tasks = text.split('\n').reverse().filter(taskText => (!!taskText)).map(taskText => {
const task = taskDefaults({ type: this.type, text: taskText }, this.user);
task.tags = this.selectedTags;
task.tags = this.selectedTags.slice();
return task;
});

View file

@ -549,7 +549,7 @@ export default {
createTask (type) {
this.openCreateBtn = false;
this.creatingTask = taskDefaults({ type, text: '' }, this.user);
this.creatingTask.tags = this.selectedTags;
this.creatingTask.tags = this.selectedTags.slice();
// Necessary otherwise the first time the modal is not rendered
Vue.nextTick(() => {