Current Behavior
If there is only one non-deleted revision in revision list and it's the last one, "Revert Changes" action fails because there is no any other content to be used for revert action.
Steps to Reproduce
Edit a post
Click on "original content" revision in the revision list
Click on Options -> Delete button and delete the "original content"
Click on "most recent" revision in the revision list
Click on Options -> Revert Changes button
See the "Reverting of changes failed." error
Expected Behavior
"Options" button should not be visible if last revision is the only non-deleted revision in the revision list.
Bug Report
Current Behavior If there is only one non-deleted revision in revision list and it's the last one, "Revert Changes" action fails because there is no any other content to be used for revert action.
Steps to Reproduce
Expected Behavior "Options" button should not be visible if last revision is the only non-deleted revision in the revision list.
Screenshots
Environment
Possible Solution I think I should count deleted revisions and change some logic here: https://github.com/the-turk/flarum-diff/blob/e2980c8f540d11b47f831d500ed4c7834271e64f/js/src/forum/components/DiffModal.js#L150-L152