diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-23 15:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-23 15:10:26 +0300 |
commit | 5c9f6c66fabf22927e862b2b60362e4ea25b250b (patch) | |
tree | 6ff391dcb7fdd3126f71af9fa4ca5e776a9ecbe3 /app/assets/javascripts/merge_conflicts | |
parent | 65fdda8d39a9af414dbe5aa3a385b9bcba00960b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/merge_conflicts')
-rw-r--r-- | app/assets/javascripts/merge_conflicts/components/diff_file_editor.js | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js index 356d8619fed..8cb4d77dc19 100644 --- a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js +++ b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js @@ -60,19 +60,28 @@ import { __ } from '~/locale'; const DataPromise = axios.get(this.file.content_path); Promise.all([EditorPromise, DataPromise]) - .then(([{ default: EditorLite }, { data: { content, new_path: path } }]) => { - const contentEl = this.$el.querySelector('.editor'); + .then( + ([ + { default: EditorLite }, + { + data: { content, new_path: path }, + }, + ]) => { + const contentEl = this.$el.querySelector('.editor'); - this.originalContent = content; - this.fileLoaded = true; + this.originalContent = content; + this.fileLoaded = true; - this.editor = new EditorLite().createInstance({ - el: contentEl, - blobPath: path, - blobContent: content, - }); - this.editor.onDidChangeModelContent(debounce(this.saveDiffResolution.bind(this), 250)); - }) + this.editor = new EditorLite().createInstance({ + el: contentEl, + blobPath: path, + blobContent: content, + }); + this.editor.onDidChangeModelContent( + debounce(this.saveDiffResolution.bind(this), 250), + ); + }, + ) .catch(() => { flash(__('An error occurred while loading the file')); }); |