From b2f79741b1bb31f17ca606df8f0bbae97283271e Mon Sep 17 00:00:00 2001 From: raviteja83 Date: Tue, 3 Oct 2023 18:32:13 +0530 Subject: [PATCH] refactor: reuse existing var --- .../src/Prebuilt/components/Footer/RoleAccordion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx b/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx index e9ef3fb81e..dbe37cf27b 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx @@ -64,8 +64,8 @@ export const RoleAccordion = ({ return null; } - const height = ROW_HEIGHT * (peers.length || peerList.length); const peersInAccordion = isOffStageRole && isLargeRoom ? peers : peerList; + const height = ROW_HEIGHT * peersInAccordion.length; const hasNext = total > peersInAccordion.length; if (peersInAccordion.length === 0) {