diff --git a/src/components/StupWizard/index.tsx b/src/components/StupWizard/index.tsx index dceefc5..c216f4d 100644 --- a/src/components/StupWizard/index.tsx +++ b/src/components/StupWizard/index.tsx @@ -8,7 +8,6 @@ import { storage } from '@/utils'; const os = require('os') const fs = require('fs').promises; const { exec } = require('child_process'); -let userInfo = JSON.parse(storage.getItem('user') as string) const StupWizard = forwardRef((props: any, ref: any) => { useImperativeHandle(ref, () => ({ changeModal: () => { @@ -106,6 +105,7 @@ const VideoComponents = () => { }, []); const getVideoDeviceList = async (): Promise => { const setting = await JSON.parse(storage.getItem('setting') as string) + const userInfo = JSON.parse(storage.getItem('user') as string) agora.getVideoDeviceManager().then(async (res) => { const { item, list } = res if ((!setting.videoDeviceId && item) || (!(list.find((item: any) => item.deviceId === setting.videoDeviceId)) && item)) {