summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/getters.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 18:07:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 18:07:53 +0000
commit682360490629376e2ec07d737c7d7dbfdaaeeab7 (patch)
tree7abe62a4d200738ac086ac0c0bd633ce0bc03f00 /app/assets/javascripts/ide/stores/getters.js
parent2f26f81ce3e3f97ddc5ce5e2e103925d7d0d170f (diff)
downloadgitlab-ce-682360490629376e2ec07d737c7d7dbfdaaeeab7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide/stores/getters.js')
-rw-r--r--app/assets/javascripts/ide/stores/getters.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/getters.js b/app/assets/javascripts/ide/stores/getters.js
index bb8374b4e78..2fc574cd343 100644
--- a/app/assets/javascripts/ide/stores/getters.js
+++ b/app/assets/javascripts/ide/stores/getters.js
@@ -64,6 +64,7 @@ export const allBlobs = state =>
export const getChangedFile = state => path => state.changedFiles.find(f => f.path === path);
export const getStagedFile = state => path => state.stagedFiles.find(f => f.path === path);
+export const getOpenFile = state => path => state.openFiles.find(f => f.path === path);
export const lastOpenedFile = state =>
[...state.changedFiles, ...state.stagedFiles].sort((a, b) => b.lastOpenedAt - a.lastOpenedAt)[0];