fix(tasks): Additional fixes

This commit is contained in:
Ben Gotow 2015-10-22 18:07:59 -07:00
parent 5415bc7665
commit 10ca07599b

View file

@ -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