Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Mishunov <dmishunov@gitlab.com>2019-07-03 15:14:44 +0300
committerDenys Mishunov <dmishunov@gitlab.com>2019-07-05 16:37:33 +0300
commitff1a4a4241f1628491a1aec05b440ff650ba66ad (patch)
treebd2cf63f652d1cfc911c1e98b8c41bc414b81c75 /app/assets/javascripts/ide/components
parent4c954a5c9e54e768aaca0eb787d8d9d2f63ebcae (diff)
Initiate editor for any file without content
Important to get file data for any file that has no content set yet: we need this information in order to build a previe for changed/staged files if they were not yet opened in the editor
Diffstat (limited to 'app/assets/javascripts/ide/components')
-rw-r--r--app/assets/javascripts/ide/components/repo_editor.vue4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue
index 5fcb11a232e..03756a634d5 100644
--- a/app/assets/javascripts/ide/components/repo_editor.vue
+++ b/app/assets/javascripts/ide/components/repo_editor.vue
@@ -144,7 +144,9 @@ export default {
'triggerFilesChange',
]),
initEditor() {
- if (this.shouldHideEditor) return;
+ if (this.shouldHideEditor && (this.file.content || this.file.raw)) {
+ return;
+ }
this.editor.clearEditor();