Reject promise when undo operation resolved without function
Merge pull request #1234 from Stuk/undo-function

Reject promise when undo operation resolved without function