modules/ui/general.js
// apply drop-down menu option. If the value is not in options, add it
apply drop-down menu option. If the value is not in options, add it
apply drop - down menu option . If the value is not in options add it
function applyOption(select, id, name = id) {
  const custom = !Array.from(select.options).some(o => o.value == id);
  if (custom) select.options.add(new Option(name, id));
  select.value = id;
}
function applyOption ( select , id , name = id ) { const custom = ! Array . from ( select . options ) . some ( o => o . value == id ) ; if ( custom ) select . options . add ( new Option ( name , id ) ) ; select . value = id ; }
apply drop-down menu option.
apply drop - down menu option .