Commit 670db0aa authored by Phil Hughes's avatar Phil Hughes

Allow the Web IDE to open empty merge requests

Closes #48166
parent 7c07a2b6
...@@ -117,7 +117,7 @@ router.beforeEach((to, from, next) => { ...@@ -117,7 +117,7 @@ router.beforeEach((to, from, next) => {
mergeRequestId: to.params.mrid, mergeRequestId: to.params.mrid,
}) })
.then(mr => { .then(mr => {
store.dispatch('updateActivityBarView', activityBarViews.review); store.dispatch('setCurrentBranchId', mr.source_branch);
store.dispatch('getBranchData', { store.dispatch('getBranchData', {
projectId: fullProjectId, projectId: fullProjectId,
...@@ -144,6 +144,10 @@ router.beforeEach((to, from, next) => { ...@@ -144,6 +144,10 @@ router.beforeEach((to, from, next) => {
}), }),
) )
.then(mrChanges => { .then(mrChanges => {
if (mrChanges.changes.length) {
store.dispatch('updateActivityBarView', activityBarViews.review);
}
mrChanges.changes.forEach((change, ind) => { mrChanges.changes.forEach((change, ind) => {
const changeTreeEntry = store.state.entries[change.new_path]; const changeTreeEntry = store.state.entries[change.new_path];
......
---
title: Fix empty merge requests not opening in the Web IDE
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment