Continue loop if we don't have a caption while populating autocomplete list.
This commit is contained in:
parent
4492925305
commit
29a011cc0a
1 changed files with 4 additions and 1 deletions
|
|
@ -176,6 +176,9 @@ var Autocomplete = function() {
|
|||
var penalty = 0;
|
||||
var index, distance;
|
||||
// caption char iteration is faster in Chrome but slower in Firefox, so lets use indexOf
|
||||
if (!caption) {
|
||||
continue loop
|
||||
}
|
||||
for (var j = 0; j < needle.length; j++) {
|
||||
// TODO add penalty on case mismatch
|
||||
var i1 = caption.indexOf(lower[j], lastIndex + 1);
|
||||
|
|
@ -302,4 +305,4 @@ var FilteredList = function(array, mutateData) {
|
|||
exports.Autocomplete = Autocomplete;
|
||||
exports.FilteredList = FilteredList;
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue