Web: Files: fixed the display of service folders

This commit is contained in:
Nikita Gopienko 2020-11-24 11:46:46 +03:00
parent 5fa38aa8ef
commit 83d9d90ac6
2 changed files with 5 additions and 4 deletions

View File

@ -1681,8 +1681,7 @@ class SectionBodyContent extends React.Component {
});
}
return (!fileAction.id && currentFolderCount === 0 && !providerItem) ||
null ? (
return (!fileAction.id && currentFolderCount === 0) || null ? (
parentId === 0 ? (
this.renderEmptyRootFolderContainer()
) : (

View File

@ -567,8 +567,10 @@ export const getTreeFolders = (state) => {
};
export const getCurrentFolderCount = (state) => {
const { filesCount, foldersCount } = state.files.selectedFolder;
return filesCount + foldersCount;
const { files, folders } = state.files;
const filesLength = files ? files.length : 0;
const foldersLength = folders ? folders.length : 0;
return filesLength + foldersLength;
};
export const getDragItem = (state) => {