Reject promise when undo operation resolved without function