fix: don't try to create a task with an empty title when creating multiple tasks at once
This commit is contained in:
parent
96523f1fbf
commit
4bd2c94256
1 changed files with 6 additions and 1 deletions
|
@ -93,8 +93,13 @@ export default {
|
|||
|
||||
const newTasks = []
|
||||
this.newTaskTitle.split(/[\r\n]+/).forEach(t => {
|
||||
const title = cleanupTitle(t)
|
||||
if (title === '') {
|
||||
return
|
||||
}
|
||||
|
||||
newTasks.push(
|
||||
this.createNewTask(cleanupTitle(t), 0, this.$store.state.auth.settings.defaultListId, this.defaultPosition)
|
||||
this.createNewTask(title, 0, this.$store.state.auth.settings.defaultListId, this.defaultPosition)
|
||||
.then(task => {
|
||||
this.$emit('taskAdded', task)
|
||||
return task
|
||||
|
|
Loading…
Reference in a new issue