diff options
author | Phil Hughes <me@iamphill.com> | 2017-11-02 12:50:01 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-11-10 19:55:58 +0300 |
commit | f82af4bdcf19328d763aeb39d9d77a45c9cb9547 (patch) | |
tree | a1f307c9190aec13d2269f6994c869e7aa42572f /app/assets/javascripts/repo | |
parent | 8c65b76b6fa71337b3effa3a77cf5a5d0fa66bd0 (diff) |
Added tests to multi-file Vuex store
Diffstat (limited to 'app/assets/javascripts/repo')
-rw-r--r-- | app/assets/javascripts/repo/stores/actions/branch.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/repo/stores/actions/branch.js b/app/assets/javascripts/repo/stores/actions/branch.js index b81a70dfd1e..61d9a5af3e3 100644 --- a/app/assets/javascripts/repo/stores/actions/branch.js +++ b/app/assets/javascripts/repo/stores/actions/branch.js @@ -3,16 +3,16 @@ import * as types from '../mutation_types'; import { pushState } from '../utils'; // eslint-disable-next-line import/prefer-default-export -export const createNewBranch = ({ rootState, commit }, branch) => service.createBranch( - rootState.project.id, +export const createNewBranch = ({ state, commit }, branch) => service.createBranch( + state.project.id, { branch, - ref: rootState.currentBranch, + ref: state.currentBranch, }, ).then(res => res.json()) .then((data) => { const branchName = data.name; - const url = location.href.replace(rootState.currentBranch, branchName); + const url = location.href.replace(state.currentBranch, branchName); pushState(url); |