From: Scott González Date: Tue, 5 Oct 2010 15:09:39 +0000 (-0400) Subject: Autocomplete: Make sure we have a response before trying to check the length. Fixes... X-Git-Tag: 1.8.6~40 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a5c119558b0b40633269c7565339e5b20754c3d8;p=jquery-ui.git Autocomplete: Make sure we have a response before trying to check the length. Fixes #6147 - Autocomplete: Errors on empty responses. --- diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 2d1d7f94b..6c4492370 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -268,7 +268,7 @@ $.widget( "ui.autocomplete", { }, _response: function( content ) { - if ( content.length ) { + if ( content && content.length ) { content = this._normalize( content ); this._suggest( content ); this._trigger( "open" );