[FIX] Prevent crash when room.uids was not inserted yet (#2055)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Djorkaeff Alexandre 2020-04-30 15:07:07 -03:00 committed by GitHub
parent 56dc7243dd
commit 3f79ab7953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1238,7 +1238,7 @@ const RocketChat = {
}, },
getRoomAvatar(room) { getRoomAvatar(room) {
if (RocketChat.isGroupChat(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; return room.prid ? room.fname : room.name;
}, },