mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +00:00
Merge "Keep sending CAPTCHA info if an unrelated save error happens"
This commit is contained in:
commit
99be8273ac
|
@ -498,11 +498,11 @@ CommentController.prototype.onReplySubmit = function ( extraParams ) {
|
|||
* @param {Object} data Error data
|
||||
*/
|
||||
CommentController.prototype.saveFail = function ( code, data ) {
|
||||
this.replyWidget.clearCaptcha();
|
||||
const captchaData = OO.getProp( data, 'discussiontoolsedit', 'edit', 'captcha' );
|
||||
|
||||
if ( captchaData ) {
|
||||
code = 'captcha';
|
||||
this.replyWidget.clearCaptcha();
|
||||
this.replyWidget.setCaptcha( captchaData );
|
||||
} else {
|
||||
this.replyWidget.setSaveErrorMessage( code, data );
|
||||
|
|
Loading…
Reference in a new issue