Follow-up cf95dbd: Fix incorrect scope in loop

Change-Id: Iae5ec0321e19bfa1c5f53326bf9d9a3082d96f77
This commit is contained in:
Ed Sanders 2021-11-15 14:31:37 +00:00 committed by Jforrester
parent 021e456751
commit c8b691b8d1

View file

@ -117,7 +117,6 @@ ve.ui.MWReferenceSearchWidget.prototype.onListNodeUpdate = function () {
*/
ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
var groups = this.internalList.getNodeGroups();
var widget = this;
if ( this.built ) {
return;
@ -172,7 +171,7 @@ ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
// Make URLs searchable
// eslint-disable-next-line no-loop-func
view.$element.find( 'a[href]' ).each( function () {
text += ' ' + widget.getAttribute( 'href' );
text += ' ' + this.getAttribute( 'href' );
} );
this.index.push( {