From 29c6b4b9f2f35b70d453233a6586db5a06df1c5c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 10 Feb 2023 15:32:22 -0800 Subject: [PATCH] recent topics: Fix exception displaying PMs with 5+ senders. The previous logic incorrectly tried to map elements of the list of user IDs beyond 4 senders to their `.id` fields, which were undefined; the correct thing to do is just use the list of user IDs that we already have. --- static/js/recent_topics_ui.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/static/js/recent_topics_ui.js b/static/js/recent_topics_ui.js index e2d71305b2..5173097e02 100644 --- a/static/js/recent_topics_ui.js +++ b/static/js/recent_topics_ui.js @@ -445,9 +445,7 @@ function format_conversation(conversation_data) { senders = all_senders.slice(-MAX_AVATAR); // Collect extra senders fullname for tooltip. extra_sender_ids = all_senders.slice(0, -MAX_AVATAR); - displayed_other_senders = extra_sender_ids - .slice(-MAX_EXTRA_SENDERS) - .map((sender) => sender.id); + displayed_other_senders = extra_sender_ids.slice(-MAX_EXTRA_SENDERS); } context.senders = people.sender_info_for_recent_topics_row(senders);