From 4afb849aec0af6bd7d69ca5d9717f9c0ce27f6fb Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 9 Aug 2020 12:42:25 +0200 Subject: [PATCH] I hate you JS --- static/js/base.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/base.js b/static/js/base.js index 5400bf5d..f8b7d50f 100644 --- a/static/js/base.js +++ b/static/js/base.js @@ -265,7 +265,10 @@ function autoCompleteNote(field_id, note_list_id, notes, notes_display, alias_pr consumers.results.forEach(function (consumer) { let note = consumer.note; note.email_confirmed = consumer.email_confirmed; - note.membership = consumer.membership; + if (consumer.hasOwnProperty("membership") && consumer.membership) + note.membership = consumer.membership; + else + note.membership = undefined; let extra_css = displayStyle(note); aliases_matched_html += li(alias_prefix + '_' + consumer.id, consumer.name,