Commit 3bb3320a authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Dried repo_editor editMode codeclimate reported code

parent 09d5cb70
...@@ -72,18 +72,19 @@ export default class RepoEditor { ...@@ -72,18 +72,19 @@ export default class RepoEditor {
}, },
editMode() { editMode() {
const panelClassList = document.querySelector('.panel-right').classList;
let readOnly = true;
if (this.editMode) { if (this.editMode) {
document.querySelector('.panel-right').classList.add('edit-mode'); panelClassList.add('edit-mode');
self.monacoEditor.updateOptions({
readOnly: false,
});
} else { } else {
document.querySelector('.panel-right').classList.remove('edit-mode'); panelClassList.remove('edit-mode');
readOnly = true;
self.monacoEditor.updateOptions({
readOnly: true,
});
} }
self.monacoEditor.updateOptions({
readOnly,
});
}, },
activeFileLabel() { activeFileLabel() {
......
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