From 3f79ab79538274ac4d0029cef6257696722b28fc Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 30 Apr 2020 15:07:07 -0300 Subject: [PATCH] [FIX] Prevent crash when room.uids was not inserted yet (#2055) Co-authored-by: Diego Mello --- app/lib/rocketchat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index ad54ac35b..52e8f6236 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -1238,7 +1238,7 @@ const RocketChat = { }, getRoomAvatar(room) { if (RocketChat.isGroupChat(room)) { - return room.uids.length + room.usernames.join(); + return room.uids?.length + room.usernames?.join(); } return room.prid ? room.fname : room.name; },