summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/getters.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-08-02 08:43:31 +0100
committerPhil Hughes <me@iamphill.com>2018-08-02 08:43:31 +0100
commitcc04a18d655ed0cfa7e5a4f0eb7971c73325afd8 (patch)
tree19216bd880035da1acbe027fbac1796c8c6b87ae /app/assets/javascripts/ide/stores/getters.js
parent3f4aaea26c65391098e9e424c4550493a1c525cb (diff)
downloadgitlab-ce-cc04a18d655ed0cfa7e5a4f0eb7971c73325afd8.tar.gz
improve performance of deleting
Diffstat (limited to 'app/assets/javascripts/ide/stores/getters.js')
-rw-r--r--app/assets/javascripts/ide/stores/getters.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/stores/getters.js b/app/assets/javascripts/ide/stores/getters.js
index 5ce268b0d05..79cdb494e5a 100644
--- a/app/assets/javascripts/ide/stores/getters.js
+++ b/app/assets/javascripts/ide/stores/getters.js
@@ -67,9 +67,9 @@ export const someUncommitedChanges = state =>
!!(state.changedFiles.length || state.stagedFiles.length);
export const getChangesInFolder = state => path => {
- const changedFilesCount = state.changedFiles.filter(f => filePathMatches(f, path)).length;
+ const changedFilesCount = state.changedFiles.filter(f => filePathMatches(f.path, path)).length;
const stagedFilesCount = state.stagedFiles.filter(
- f => filePathMatches(f, path) && !getChangedFile(state)(f.path),
+ f => filePathMatches(f.path, path) && !getChangedFile(state)(f.path),
).length;
return changedFilesCount + stagedFilesCount;