Skip to content

A platform for community discussion. Free, open, simple.

FIX: Prevent error when poster isn't present in message notification item (#24776)

Mark VanLandinghamddf3c571cf71
diff --git a/app/assets/javascripts/discourse/app/components/user-menu/messages-list.js b/app/assets/javascripts/discourse/app/components/user-menu/messages-list.js
index 401af5e2c01..2e73a0d2466 100644
--- a/app/assets/javascripts/discourse/app/components/user-menu/messages-list.js
+++ b/app/assets/javascripts/discourse/app/components/user-menu/messages-list.js
@@ -83,7 +83,7 @@ export default class UserMenuMessagesList extends UserMenuNotificationsList {
topics.forEach((t) => {
t.last_poster_avatar_template = usersById.get(
t.lastPoster.user_id
- ).avatar_template;
+ )?.avatar_template;
});
}