Skip to content

Commit

Permalink
fix: fix autocomplete when no lists (#3649)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpcross authored Nov 9, 2023
1 parent 2d29595 commit 337373c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/mlarchive/static/mlarchive/js/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
$(function() {
$('#id_q').focus();

var lists = $("#id_search_form").data("lists").split(",");
var source = [];
//alert(lists[0]);
var lists = [];
var list_data = $("#id_search_form").data("lists");
if (list_data) {
lists = list_data.split(",");
}
$.each(lists, function(index, value) {
var item = new Object();
item.id = index;
Expand Down

0 comments on commit 337373c

Please sign in to comment.