diff options
author | André Luís <aluis@gitlab.com> | 2018-05-24 18:10:02 +0100 |
---|---|---|
committer | André Luís <aluis@gitlab.com> | 2018-05-24 18:17:25 +0100 |
commit | 231af6a60debfab611ec4c4d23d184182a0767b6 (patch) | |
tree | fdd1764835dda97222e84e27757c867342ce0468 | |
parent | ab390d01e55bd48f3acc9d0a9e3e721ad2c0da3a (diff) | |
download | gitlab-ce-44579-ide-add-pipeline-to-status-bar.tar.gz |
Improve the mutation to not need Vue.set for reactivity44579-ide-add-pipeline-to-status-bar
-rw-r--r-- | app/assets/javascripts/ide/stores/mutations/branch.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/stores/mutations/branch.js b/app/assets/javascripts/ide/stores/mutations/branch.js index 1b2c3a2a1ad..f17ec4da308 100644 --- a/app/assets/javascripts/ide/stores/mutations/branch.js +++ b/app/assets/javascripts/ide/stores/mutations/branch.js @@ -1,4 +1,3 @@ -import Vue from 'vue'; import * as types from '../mutation_types'; export default { @@ -15,6 +14,10 @@ export default { treeId: `${projectPath}/${branchName}`, active: true, workingReference: '', + commit: { + ...branch.commit, + pipeline: {}, + }, }, }, }); @@ -30,6 +33,8 @@ export default { }); }, [types.SET_LAST_COMMIT_PIPELINE](state, { projectId, branchId, pipeline }) { - Vue.set(state.projects[projectId].branches[branchId].commit, 'pipeline', pipeline); + Object.assign(state.projects[projectId].branches[branchId].commit, { + pipeline, + }); }, }; |