2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-25 22:27:39 +00:00

Exit if there is no value for hint.

This commit is contained in:
Tomas Kirda 2013-06-27 16:25:47 -05:00
parent e3e27bb066
commit 6a9c2caaf7

View File

@ -507,6 +507,10 @@
value = that.el.val().toLowerCase(), value = that.el.val().toLowerCase(),
bestMatch = null; bestMatch = null;
if (!value) {
return;
}
$.each(that.suggestions, function (i, suggestion) { $.each(that.suggestions, function (i, suggestion) {
var foundMatch = suggestion.value.toLowerCase().indexOf(value) === 0; var foundMatch = suggestion.value.toLowerCase().indexOf(value) === 0;
if (foundMatch) { if (foundMatch) {