fix(task): cancel loading state when creating a new task does not work
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
f8450f58a4
commit
e999b38d3b
|
@ -377,12 +377,17 @@ export const useTaskStore = defineStore('task', {
|
|||
task.repeatAfter = parsedTask.repeats
|
||||
|
||||
const taskService = new TaskService()
|
||||
const createdTask = await taskService.create(task)
|
||||
const result = await this.addLabelsToTask({
|
||||
task: createdTask,
|
||||
parsedLabels: parsedTask.labels,
|
||||
})
|
||||
cancel()
|
||||
try {
|
||||
const createdTask = await taskService.create(task)
|
||||
const result = await this.addLabelsToTask({
|
||||
task: createdTask,
|
||||
parsedLabels: parsedTask.labels,
|
||||
})
|
||||
} catch (e) {
|
||||
throw e
|
||||
} finally {
|
||||
cancel()
|
||||
}
|
||||
return result
|
||||
},
|
||||
},
|
||||
|
|
Reference in New Issue