Skip to content

Commit 6a9c2ca

Browse files
author
Tomas Kirda
committed
Exit if there is no value for hint.
1 parent e3e27bb commit 6a9c2ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jquery.autocomplete.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,10 @@
507507
value = that.el.val().toLowerCase(),
508508
bestMatch = null;
509509

510+
if (!value) {
511+
return;
512+
}
513+
510514
$.each(that.suggestions, function (i, suggestion) {
511515
var foundMatch = suggestion.value.toLowerCase().indexOf(value) === 0;
512516
if (foundMatch) {

0 commit comments

Comments
 (0)