Skip to content

Commit

Permalink
fix: role options crash
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Mar 4, 2024
1 parent 9015099 commit a66d06b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ export const RoleOptions = ({ roleName, peerList }: { roleName: string; peerList
const { on_stage_role, off_stage_roles = [] } = (elements as DefaultConferencingScreen_Elements)?.on_stage_exp || {};
const canRemoveRoleFromStage = permissions?.changeRole && roleName === on_stage_role;
const role = useHMSStore(selectRoleByRoleName(roleName));
const tracks = useHMSStore(selectTracksMap);
if (!role) {
return null;
}
const canPublishAudio = role.publishParams.allowed.includes('audio');
const canPublishVideo = role.publishParams.allowed.includes('video');
const tracks = useHMSStore(selectTracksMap);

let isVideoOnForSomePeers = false;
let isAudioOnForSomePeers = false;
Expand Down

0 comments on commit a66d06b

Please sign in to comment.