Simplify this already_have now that the other code is gone.

master
voussoir 2020-04-02 17:09:09 -07:00
parent 84833832e4
commit 7fc4604025
1 changed files with 1 additions and 10 deletions

View File

@ -372,16 +372,7 @@ PARAM_DEFAULTS = {
function add_searchtag(ul, value, inputted_list, li_class) function add_searchtag(ul, value, inputted_list, li_class)
{ {
console.log("adding " + value); console.log("adding " + value);
var already_have = false; var already_have = inputted_list.indexOf(value) !== -1;
for (var index = 0; index < inputted_list.length; index += 1)
{
existing_tag = inputted_list[index];
if (existing_tag == value)
{
already_have = true;
break;
}
}
if (already_have) if (already_have)
{return;} {return;}