Skip to content

Commit a5c1195

Browse files
committed
Autocomplete: Make sure we have a response before trying to check the length. Fixes #6147 - Autocomplete: Errors on empty responses.
1 parent 3b38025 commit a5c1195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ $.widget( "ui.autocomplete", {
268268
},
269269

270270
_response: function( content ) {
271-
if ( content.length ) {
271+
if ( content && content.length ) {
272272
content = this._normalize( content );
273273
this._suggest( content );
274274
this._trigger( "open" );

0 commit comments

Comments
 (0)