aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/autocomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets/autocomplete.js')
-rw-r--r--ui/widgets/autocomplete.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/widgets/autocomplete.js b/ui/widgets/autocomplete.js
index 60d326544..66756820b 100644
--- a/ui/widgets/autocomplete.js
+++ b/ui/widgets/autocomplete.js
@@ -263,7 +263,7 @@ $.widget( "ui.autocomplete", {
// Announce the value in the liveRegion
label = ui.item.attr( "aria-label" ) || item.value;
- if ( label && $.trim( label ).length ) {
+ if ( label && String.prototype.trim.call( label ).length ) {
this.liveRegion.children().hide();
$( "<div>" ).text( label ).appendTo( this.liveRegion );
}
@@ -375,7 +375,7 @@ $.widget( "ui.autocomplete", {
_initSource: function() {
var array, url,
that = this;
- if ( $.isArray( this.options.source ) ) {
+ if ( Array.isArray( this.options.source ) ) {
array = this.options.source;
this.source = function( request, response ) {
response( $.ui.autocomplete.filter( array, request.term ) );