Skip to content

Commit

Permalink
[Fix] Broken useEffect opened new BBB Tab twice (#20770)
Browse files Browse the repository at this point in the history
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
  • Loading branch information
Cosnavel and ggazzo authored Mar 23, 2021
1 parent d27eb90 commit 7199a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/views/room/contextualBar/Call/BBB/CallBBB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ const D: FC<{ rid: IRoom['_id'] }> = ({ rid }) => {
});

useEffect(() => {
if (room?.streamingOptions?.type !== 'call' || popout.context) {
if (room?.streamingOptions?.type !== 'call' || openNewWindow || popout.context) {
return;
}
startCall();
return (): void => {
popout.close();
};
}, [room?.streamingOptions?.type, startCall]);
}, [room?.streamingOptions?.type, startCall, openNewWindow]);

const canManageCall = room?.t === 'd' || hasCallManagement;

Expand Down

0 comments on commit 7199a7c

Please sign in to comment.