Commit f1542fb7 authored by Denys Mishunov's avatar Denys Mishunov

Addressing the reviewer's comments

parent 2f4e80d2
...@@ -60,8 +60,7 @@ import { __ } from '~/locale'; ...@@ -60,8 +60,7 @@ import { __ } from '~/locale';
const DataPromise = axios.get(this.file.content_path); const DataPromise = axios.get(this.file.content_path);
Promise.all([EditorPromise, DataPromise]) Promise.all([EditorPromise, DataPromise])
.then(([{ default: EditorLite }, { data }]) => { .then(([{ default: EditorLite }, { data: { content, new_path: path } }]) => {
const { content, new_path: path } = data;
const contentEl = this.$el.querySelector('.editor'); const contentEl = this.$el.querySelector('.editor');
this.originalContent = content; this.originalContent = content;
...@@ -69,8 +68,8 @@ import { __ } from '~/locale'; ...@@ -69,8 +68,8 @@ import { __ } from '~/locale';
this.editor = new EditorLite().createInstance({ this.editor = new EditorLite().createInstance({
el: contentEl, el: contentEl,
blobPath: path || '', blobPath: path,
blobContent: content || '', blobContent: content,
}); });
this.editor.onDidChangeModelContent(debounce(this.saveDiffResolution.bind(this), 250)); this.editor.onDidChangeModelContent(debounce(this.saveDiffResolution.bind(this), 250));
}) })
......
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