I hate you JS

This commit is contained in:
Yohann D'ANELLO 2020-08-09 12:42:25 +02:00
parent 872456df20
commit 4afb849aec
1 changed files with 4 additions and 1 deletions

View File

@ -265,7 +265,10 @@ function autoCompleteNote(field_id, note_list_id, notes, notes_display, alias_pr
consumers.results.forEach(function (consumer) { consumers.results.forEach(function (consumer) {
let note = consumer.note; let note = consumer.note;
note.email_confirmed = consumer.email_confirmed; note.email_confirmed = consumer.email_confirmed;
if (consumer.hasOwnProperty("membership") && consumer.membership)
note.membership = consumer.membership; note.membership = consumer.membership;
else
note.membership = undefined;
let extra_css = displayStyle(note); let extra_css = displayStyle(note);
aliases_matched_html += li(alias_prefix + '_' + consumer.id, aliases_matched_html += li(alias_prefix + '_' + consumer.id,
consumer.name, consumer.name,