Skip to content

Commit

Permalink
Autocomplete: remove extra "that" variable
Browse files Browse the repository at this point in the history
  • Loading branch information
theodoreb committed Dec 23, 2021
1 parent fb22d35 commit e0aeaa8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ui/widgets/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,8 @@ $.widget( "ui.autocomplete", {
label = ui.item.attr( "aria-label" ) || item.value;
if ( label && String.prototype.trim.call( label ).length ) {
clearTimeout( this.liveRegionTimer );
var that = this;
this.liveRegionTimer = this._delay( function() {
that.liveRegion.html( $( "<div>" ).text( label ) );
this.liveRegion.html( $( "<div>" ).text( label ) );
}, 100 );
}
},
Expand Down Expand Up @@ -668,9 +667,8 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
message = this.options.messages.noResults;
}
clearTimeout( this.liveRegionTimer );
var that = this;
this.liveRegionTimer = this._delay( function() {
that.liveRegion.html( $( "<div>" ).text( message ) );
this.liveRegion.html( $( "<div>" ).text( message ) );
}, 100 );
}
} );
Expand Down

0 comments on commit e0aeaa8

Please sign in to comment.