Skip to content

Commit 88bbaca

Browse files
Fix screenshare and participant button being disabled when unrelated options supplied to call composite (#2181)
1 parent 1796bbf commit 88bbaca

8 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix Participants and ScreenShare buttons being disabled when unrelated options are passed into the call composite",
4+
"packageName": "@internal/react-composites",
5+
"email": "2684369+JamesBurnside@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-composites/src/composites/CallComposite/pages/LobbyPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export const LobbyPage = (props: LobbyPageProps): JSX.Element => {
6666
const disableLobbyPageControls = (
6767
callControlOptions: CallControlOptions | boolean | undefined
6868
): CallControlOptions | boolean | undefined => {
69-
let newOptions = callControlOptions;
69+
// Ensure we clone the prop if it is an object to ensure we do not mutate the original prop.
70+
let newOptions = callControlOptions instanceof Object ? { ...callControlOptions } : callControlOptions;
7071
if (newOptions !== false) {
7172
if (newOptions === true || newOptions === undefined) {
7273
newOptions = {
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)