Merge "Keep sending CAPTCHA info if an unrelated save error happens"

This commit is contained in:
jenkins-bot 2024-08-29 09:12:43 +00:00 committed by Gerrit Code Review
commit 99be8273ac

View file

@ -498,11 +498,11 @@ CommentController.prototype.onReplySubmit = function ( extraParams ) {
* @param {Object} data Error data * @param {Object} data Error data
*/ */
CommentController.prototype.saveFail = function ( code, data ) { CommentController.prototype.saveFail = function ( code, data ) {
this.replyWidget.clearCaptcha();
const captchaData = OO.getProp( data, 'discussiontoolsedit', 'edit', 'captcha' ); const captchaData = OO.getProp( data, 'discussiontoolsedit', 'edit', 'captcha' );
if ( captchaData ) { if ( captchaData ) {
code = 'captcha'; code = 'captcha';
this.replyWidget.clearCaptcha();
this.replyWidget.setCaptcha( captchaData ); this.replyWidget.setCaptcha( captchaData );
} else { } else {
this.replyWidget.setSaveErrorMessage( code, data ); this.replyWidget.setSaveErrorMessage( code, data );