diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 09:09:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 09:09:25 +0300 |
commit | 3d064c737e8448880e6180aeddc59000a01aa6a8 (patch) | |
tree | c97dcfe02e48426f96865068ffe8dcdd17bb1a96 /app/assets/javascripts/diffs/store/mutations.js | |
parent | 7ba5b9babaa5802c39e686c57cbf4a3f4725c4b0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs/store/mutations.js')
-rw-r--r-- | app/assets/javascripts/diffs/store/mutations.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/store/mutations.js b/app/assets/javascripts/diffs/store/mutations.js index bb4c80b5759..3c00ae98e75 100644 --- a/app/assets/javascripts/diffs/store/mutations.js +++ b/app/assets/javascripts/diffs/store/mutations.js @@ -10,6 +10,10 @@ import { } from './utils'; import * as types from './mutation_types'; +function updateDiffFilesInState(state, files) { + return Object.assign(state, { diffFiles: files }); +} + export default { [types.SET_BASE_CONFIG](state, options) { const { @@ -46,6 +50,10 @@ export default { Object.assign(state, { retrievingBatches }); }, + [types.SET_DIFF_FILES](state, files) { + updateDiffFilesInState(state, files); + }, + [types.SET_DIFF_DATA](state, data) { let files = state.diffFiles; @@ -58,8 +66,8 @@ export default { Object.assign(state, { ...convertObjectPropsToCamelCase(data), - diffFiles: files, }); + updateDiffFilesInState(state, files); }, [types.SET_DIFF_DATA_BATCH](state, data) { @@ -67,8 +75,8 @@ export default { Object.assign(state, { ...convertObjectPropsToCamelCase(data), - diffFiles: files, }); + updateDiffFilesInState(state, files); }, [types.SET_COVERAGE_DATA](state, coverageFiles) { |