Don't break the mmf inputs when autocomplete init failed.

This commit is contained in:
voussoir 2020-10-25 20:20:40 -07:00
parent ca3540670c
commit 5f91554198

View file

@ -436,9 +436,14 @@ function add_searchtag_from_box(box, inputted_list, li_class)
{return;} {return;}
let value = box.value; let value = box.value;
value = tag_autocomplete.resolve(value); if (tag_autocomplete.datalist !== null)
if (value === null) {
{return;} // If the autocomplete failed for whatever reason, or is simply taking
// too long, let's just let it slide.
value = tag_autocomplete.resolve(value);
if (value === null)
{return;}
}
console.log(inputted_list); console.log(inputted_list);
ul = box.parentElement.parentElement; ul = box.parentElement.parentElement;