mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
fix(tasks): Additional fixes
This commit is contained in:
parent
5415bc7665
commit
10ca07599b
1 changed files with 2 additions and 4 deletions
|
@ -198,11 +198,9 @@ class ChangeMailTask extends Task
|
|||
|
||||
createUndoTask: ->
|
||||
if @_isUndoTask
|
||||
err = new Error("ChangeMailTask::createUndoTask Cannot create an undo task from an undo task.")
|
||||
return Promise.resolve([Task.Status.Failed, err])
|
||||
throw new Error("ChangeMailTask::createUndoTask Cannot create an undo task from an undo task.")
|
||||
if not @_restoreValues
|
||||
err = new Error("ChangeMailTask::createUndoTask Cannot undo a task which has not finished performLocal yet.")
|
||||
return Promise.resolve([Task.Status.Failed, err])
|
||||
throw new Error("ChangeMailTask::createUndoTask Cannot undo a task which has not finished performLocal yet.")
|
||||
|
||||
task = @createIdenticalTask()
|
||||
task._restoreValues = @_restoreValues
|
||||
|
|
Loading…
Reference in a new issue