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 {
},
editMode() {
const panelClassList = document.querySelector('.panel-right').classList;
let readOnly = true;
if (this.editMode) {
document.querySelector('.panel-right').classList.add('edit-mode');
self.monacoEditor.updateOptions({
readOnly: false,
});
panelClassList.add('edit-mode');
} else {
document.querySelector('.panel-right').classList.remove('edit-mode');
self.monacoEditor.updateOptions({
readOnly: true,
});
panelClassList.remove('edit-mode');
readOnly = true;
}
self.monacoEditor.updateOptions({
readOnly,
});
},
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