Skip to content

Clicking "cancel" on rollback reason on contribs page results in error

In reference to MR !#4

When clicking cancel on a rollback dialog on a contributions page, UV throws an error saying "Sorry, there was an error performing a rollback."

It happens when you rollback from the contribs page. Head to a contribs page, find any current revision and press RB, then press cancel and you will see the error.

Following the stack points to the Revert function in Revert.ts which does not check for nullish values in the edit summary (alongside in the Rollback function), therefore, saying such an error "can't be the case" is incorrect. The root of the issue is in the contribs page injector here. Adding a check if null in both the revert and rollback routine would resolve the issue.

[4230ms] [Ultraviolet 0.1.3] [ERROR] Failed to revert. Error: No reason was given for a revert.
    at Function.extractReasonFromContext (Revert.ts:363:22)
    at Function.<anonymous> (Revert.ts:462:28)
    at Generator.next (<anonymous>)
    at c (tslib.es6.js:73:58)
Edited by Ed E