diff --git a/src/views/TasksForTracker.vue b/src/views/TasksForTracker.vue index 5c25e3b..5fcac0e 100644 --- a/src/views/TasksForTracker.vue +++ b/src/views/TasksForTracker.vue @@ -83,12 +83,12 @@ export default { this.$store.state.selectedTracker.tasks = []; } - let newTasks = [this.newTaskInput]; + let newTasks = []; - if (this.newTaskInput.split(';') > 3) { - newTasks = this.newTaskInput.split(';').reverse().map((task) => { - return task.trim(); - }) + if (this.newTaskInput.split(';').length > 3) { + newTasks = this.newTaskInput.split(';').reverse().map((task) => task.trim()); + } else { + newTasks.push(this.newTaskInput); } newTasks.forEach((task) => {