diff --git a/public/react/src/modules/courses/coursesPublic/SelectSetting.js b/public/react/src/modules/courses/coursesPublic/SelectSetting.js index 1e177be3d..d96ae6f78 100644 --- a/public/react/src/modules/courses/coursesPublic/SelectSetting.js +++ b/public/react/src/modules/courses/coursesPublic/SelectSetting.js @@ -106,12 +106,11 @@ class Selectsetting extends Component{ savecouseShixunModal=()=>{ let {fileList,is_public,description,datatime,Radiovalue}=this.state; - let newfileList=[]; if(fileList!=undefined&&fileList.length>0){ - for(var list of fileList){ + fileList.map((list,key)=>{ newfileList.push(list.response.id) - } + }) } diff --git a/public/react/src/modules/courses/coursesPublic/sendResource.js b/public/react/src/modules/courses/coursesPublic/sendResource.js index e423340e7..cc7ecc03a 100644 --- a/public/react/src/modules/courses/coursesPublic/sendResource.js +++ b/public/react/src/modules/courses/coursesPublic/sendResource.js @@ -132,9 +132,9 @@ class Sendresource extends Component{ let newfileList=[]; if(fileList!=undefined&&fileList.length>0){ - for(var list of fileList){ + fileList.map((list,key)=>{ newfileList.push(list.response.id) - } + }) }