dev_ec
hjm 5 years ago
parent c09054de5e
commit 5f6fc6bbeb

@ -109,7 +109,7 @@ class TPMRepositoryComponent extends Component {
if (!array || array.length === 0) {
return false
}
return this._isFileName( array[array.length - 1] )
return this.nameTypeMap[array[array.length - 1]] !== 'tree' && this._isFileName( array[array.length - 1] )
}
// listItem 如果是num则是通过面包屑点击过来的取pathArray的子集
fetchRepo = (listItem) => {
@ -138,7 +138,8 @@ class TPMRepositoryComponent extends Component {
let urlNewPathArray = newPathArray;
let fileInPathArray = false;
if (newPathArray.length) {
fileInPathArray = (listItem.type !== 'tree' && this._isFileName( newPathArray[newPathArray.length - 1] ))
fileInPathArray = this.nameTypeMap[newPathArray[newPathArray.length - 1]] ? this.nameTypeMap[newPathArray[newPathArray.length - 1]] !== 'tree'
: (listItem.type !== 'tree' && this._isFileName( newPathArray[newPathArray.length - 1] ))
if ( fileInPathArray ) {
urlNewPathArray = newPathArray.slice(0, newPathArray.length - 1)
}

Loading…
Cancel
Save