summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-05-11 08:46:05 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-05-11 10:48:09 +0100
commit3a7d28597e3e23ef497186891662b4a85d013b08 (patch)
tree9aaa631a42bf93fcd83ee8568f64d11649beba54 /app
parent04ab2f1f021ff4f3e732da6ebbdfcb967c63f037 (diff)
downloadgitlab-ce-3a7d28597e3e23ef497186891662b4a85d013b08.tar.gz
Merge branch 'ide-mr-open-file-fix' into 'master'
Fixed none merge request files not being openable in the web IDE See merge request gitlab-org/gitlab-ce!18881
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/ide/components/repo_editor.vue2
-rw-r--r--app/assets/javascripts/ide/stores/utils.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue
index ff7e546fb9c..f8678b602ac 100644
--- a/app/assets/javascripts/ide/components/repo_editor.vue
+++ b/app/assets/javascripts/ide/components/repo_editor.vue
@@ -140,7 +140,7 @@ export default {
this.file.staged && this.file.key.indexOf('unstaged-') === 0 ? head : null,
);
- if (this.viewer === viewerTypes.mr) {
+ if (this.viewer === viewerTypes.mr && this.file.mrChange) {
this.editor.attachMergeRequestModel(this.model);
} else {
this.editor.attachModel(this.model);
diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js
index bc79ff4a542..e0b9766fbee 100644
--- a/app/assets/javascripts/ide/stores/utils.js
+++ b/app/assets/javascripts/ide/stores/utils.js
@@ -44,6 +44,7 @@ export const dataStructure = () => ({
size: 0,
parentPath: null,
lastOpenedAt: 0,
+ mrChange: null,
});
export const decorateData = entity => {