Comment & compact targetLinksToNewWindow related syntax

Change-Id: Ifc18519d0d811c5c3fa64b1183f4eb94afd0acad
This commit is contained in:
Thiemo Kreuz 2021-09-03 14:57:29 +02:00
parent 6caf286134
commit e7df422495

View file

@ -695,9 +695,8 @@ ve.init.mw.ArticleTarget.prototype.showSaveError = function ( msg, allowReapply,
*/
ve.init.mw.ArticleTarget.prototype.extractErrorMessages = function ( data ) {
var $errorMsgs = ( new mw.Api() ).getErrorMessage( data );
$errorMsgs.each( function () {
ve.targetLinksToNewWindow( this );
} );
// Warning, this assumes there are only Element nodes in the jQuery set
$errorMsgs.toArray().forEach( ve.targetLinksToNewWindow );
return $errorMsgs;
};