From e0aeaa8bd6fc7146dc8ccf6e0fadf3c39a18234c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9odore=20BIADALA?= Date: Thu, 23 Dec 2021 11:13:22 +0100 Subject: [PATCH] Autocomplete: remove extra "that" variable --- ui/widgets/autocomplete.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/widgets/autocomplete.js b/ui/widgets/autocomplete.js index 1e1d16f5803..a7b6f52bd19 100644 --- a/ui/widgets/autocomplete.js +++ b/ui/widgets/autocomplete.js @@ -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( $( "
" ).text( label ) ); + this.liveRegion.html( $( "
" ).text( label ) ); }, 100 ); } }, @@ -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( $( "
" ).text( message ) ); + this.liveRegion.html( $( "
" ).text( message ) ); }, 100 ); } } );