diff options
author | Phil Hughes <me@iamphill.com> | 2018-06-25 10:37:27 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-06-27 09:49:21 +0100 |
commit | 0531631ce1f30a3bdd0d4a6a752929b25fd4df89 (patch) | |
tree | aa0f0bdc5cb632cf2faa371892bb1cc3215194bf /app/assets/javascripts/ide/stores/getters.js | |
parent | 9b760c4cec3bad049d508d741cdcc6991f90c7c2 (diff) | |
download | gitlab-ce-0531631ce1f30a3bdd0d4a6a752929b25fd4df89.tar.gz |
disable current branch option in commit form is user does not have permissions to push
Diffstat (limited to 'app/assets/javascripts/ide/stores/getters.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/getters.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/stores/getters.js b/app/assets/javascripts/ide/stores/getters.js index b239a605371..e1ab7547326 100644 --- a/app/assets/javascripts/ide/stores/getters.js +++ b/app/assets/javascripts/ide/stores/getters.js @@ -82,10 +82,13 @@ export const getStagedFilesCountForPath = state => path => getChangesCountForFiles(state.stagedFiles, path); export const lastCommit = (state, getters) => { - const branch = getters.currentProject && getters.currentProject.branches[state.currentBranchId]; + const branch = getters.currentProject && getters.currentBranch; return branch ? branch.commit : null; }; +export const currentBranch = (state, getters) => + getters.currentProject.branches[state.currentBranchId]; + // prevent babel-plugin-rewire from generating an invalid default during karma tests export default () => {}; |