This commit is contained in:
caishi 2020-11-16 16:17:03 +08:00
parent 43fc24e114
commit bf84063a3c
1 changed files with 4 additions and 5 deletions

View File

@ -209,12 +209,11 @@ class CoderRootDirectory extends Component {
isSpin:false
})
if(result){
if( entries && entries.length > 0){
let { chooseType } = this.state;
// 当前返回的子目录只有一条数据,且这条数据返回的是文件类型
if(entries.length === 1 && (entries[0].type === "file" || chooseType ==="file")){
if( entries){
// 返回对象entries.type
if(entries.type){
this.setState({
fileDetail:entries,
fileDetail:[entries],
rootList:undefined,
subFileType:false
})