Skip to content

Commit

Permalink
chore: fix tslint in selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelramalho19 committed Dec 14, 2020
1 parent 440d42e commit fd9414b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bundles/files/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ const selectors = () => ({
* @param {Model} state
*/
selectCurrentDirectorySize: (state) => {
const content = /** @type {import('./protocol').DirectoryContent} **/ (state.files.pageContent)?.content
return content?.reduce((prev, curr) => prev + curr.size, 0)
return state.files.pageContent?.type === 'directory' && state.files.pageContent?.content?.reduce((prev, curr) => prev + curr.size, 0)
},

/**
Expand Down

0 comments on commit fd9414b

Please sign in to comment.