Controller: Use 'this' in $.each as intended

Change-Id: Icd507d6726ca391fc39e5d89429e0eed35ba9873
This commit is contained in:
Ed Sanders 2021-12-20 15:24:04 +00:00
parent ebd37369ce
commit fe18f5ba22

View file

@ -449,8 +449,8 @@ function updateSubscriptionStates( $container, headingsToUpdate ) {
var $links = $container.find( '.ext-discussiontools-init-section-subscribe-link' );
var linksByName = {};
$links.each( function ( i, elem ) {
linksByName[ elem.getAttribute( 'data-mw-comment-name' ) ] = elem;
$links.each( function () {
linksByName[ this.getAttribute( 'data-mw-comment-name' ) ] = this;
} );
// If the topic is already marked as auto-subscribed, there's nothing to do.