From 3e98f55a52eb3672c61534aa0f4a6962235cdae5 Mon Sep 17 00:00:00 2001 From: Andreas Greimel Date: Wed, 13 Jul 2022 15:37:48 +0200 Subject: [PATCH] Always show at least one empty room for group join Signed-off-by: Andreas Greimel --- client/src/components/RoomGrid.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/RoomGrid.tsx b/client/src/components/RoomGrid.tsx index 1676f5d9..9e15567a 100644 --- a/client/src/components/RoomGrid.tsx +++ b/client/src/components/RoomGrid.tsx @@ -76,7 +76,7 @@ const RoomGrid = (props: Props) => { const minimumRoomsToShow = group.groupJoin.minimumRoomsToShow || 1; const [emptyRooms, filledRooms] = partition(rooms, (room) => participantsInMeeting(room.meetingId).length === 0); - return [...filledRooms, ...emptyRooms.slice(0, minimumRoomsToShow - filledRooms.length)]; + return [...filledRooms, ...emptyRooms.slice(0, Math.max(minimumRoomsToShow - filledRooms.length, 1))]; } function renderRoomCards() {