diff options
author | Phil Hughes <me@iamphill.com> | 2018-12-05 17:12:51 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-12-05 17:12:51 +0300 |
commit | d3a8fb6e791aa4c6639eb15349d18f02e0408030 (patch) | |
tree | 585fedd5960c0ec33f354c0a5f9bb12796db28c7 /app/assets/javascripts/diffs/store | |
parent | 14db2a42149cc1680762cf6df443677d76dca9ee (diff) |
Fixed expanding diff commit files
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50662
Diffstat (limited to 'app/assets/javascripts/diffs/store')
-rw-r--r-- | app/assets/javascripts/diffs/store/actions.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index c87e178c8cf..c0456c18e44 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -147,13 +147,19 @@ export const scrollToLineIfNeededParallel = (_, line) => { } }; -export const loadCollapsedDiff = ({ commit }, file) => - axios.get(file.load_collapsed_diff_url).then(res => { - commit(types.ADD_COLLAPSED_DIFFS, { - file, - data: res.data, +export const loadCollapsedDiff = ({ commit, getters }, file) => + axios + .get(file.load_collapsed_diff_url, { + params: { + commit_id: getters.commitId, + }, + }) + .then(res => { + commit(types.ADD_COLLAPSED_DIFFS, { + file, + data: res.data, + }); }); - }); export const expandAllFiles = ({ commit }) => { commit(types.EXPAND_ALL_FILES); |