From f76e47a3ef6f6fa6c07020a9a40d3a085d0bacd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 27 Aug 2024 23:53:54 +0200 Subject: [PATCH] Keep sending CAPTCHA info if an unrelated save error happens Bug: T371041 Change-Id: I72c73b0e323c794578edb14efcc9cc06e46a194b --- modules/CommentController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/CommentController.js b/modules/CommentController.js index 68d812449..a7d59171c 100644 --- a/modules/CommentController.js +++ b/modules/CommentController.js @@ -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 );