Skip to content

Commit

Permalink
Fix count
Browse files Browse the repository at this point in the history
  • Loading branch information
berzniz committed May 1, 2020
1 parent 7bebb0c commit 6443828
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export const createFileTree = (filter = EMPTY_FILTER) => {
title = getCurrentFileLocation(title)
return { title, href, parts: title.split('/') }
})
const count = fileInfo.filter(({ href }) => href.includes('#diff')).length
const tree = {
nodeLabel: '/',
list: [],
Expand Down Expand Up @@ -157,7 +158,7 @@ export const createFileTree = (filter = EMPTY_FILTER) => {
})
return {
tree: folderConcat(tree),
count: fileInfo.length
count
}
}

Expand Down

0 comments on commit 6443828

Please sign in to comment.