summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/store/actions.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 21:07:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 21:07:45 +0000
commit0b12a5312c9701fbfed25fbb334d47900ced736b (patch)
treea29a27e297134f573fd8e5c298d241f3156c207a /app/assets/javascripts/diffs/store/actions.js
parent92f95ccac81911d1fcc32e999a7f1ce04624a56c (diff)
downloadgitlab-ce-0b12a5312c9701fbfed25fbb334d47900ced736b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs/store/actions.js')
-rw-r--r--app/assets/javascripts/diffs/store/actions.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js
index 6714f4e62b8..b920e041135 100644
--- a/app/assets/javascripts/diffs/store/actions.js
+++ b/app/assets/javascripts/diffs/store/actions.js
@@ -64,6 +64,7 @@ export const fetchDiffFiles = ({ state, commit }) => {
const urlParams = {
w: state.showWhitespace ? '0' : '1',
};
+ let returnData;
if (state.useSingleDiffStyle) {
urlParams.view = state.diffViewType;
@@ -87,9 +88,13 @@ export const fetchDiffFiles = ({ state, commit }) => {
worker.postMessage(state.diffFiles);
+ returnData = res.data;
return Vue.nextTick();
})
- .then(handleLocationHash)
+ .then(() => {
+ handleLocationHash();
+ return returnData;
+ })
.catch(() => worker.terminate());
};
@@ -147,6 +152,7 @@ export const fetchDiffFilesMeta = ({ commit, state }) => {
prepareDiffData(data);
worker.postMessage(data.diff_files);
+ return data;
})
.catch(() => worker.terminate());
};