diff --git a/src/components/JoinSetting/index.tsx b/src/components/JoinSetting/index.tsx index a892189..af7fa60 100644 --- a/src/components/JoinSetting/index.tsx +++ b/src/components/JoinSetting/index.tsx @@ -20,9 +20,9 @@ const JoinSetting = forwardRef((_props: any, ref: any) => { await agora.init() } setJoinRoomSettingForm((res: any) => { - res.forEach((item: any, index: number) => { - if (index === 0 && role.ID.includes(user.roleId)) { - agora.getAudioMediaList().then(res => { + res.forEach(async (item: any, index: number) => { + if (index === 0 && role.ID.includes(userInfo.roleId)) { + await agora.getAudioMediaList().then(res => { item.active = res.ecordingList.length ? true : false }) } else {