Commit 06687ae6 authored by yann300's avatar yann300

remove self

parent 8ba54143
......@@ -100,13 +100,12 @@ class FileManager {
}
closeFile (name) {
var self = this
delete self.openedFiles[name]
if (Object.keys(self.openedFiles).length) {
self.switchFile(Object.keys(self.openedFiles)[0])
delete this.openedFiles[name]
if (Object.keys(this.openedFiles).length) {
this.switchFile(Object.keys(this.openedFiles)[0])
} else {
self._deps.editor.displayEmptyReadOnlySession()
self._deps.config.set('currentFile', '')
this._deps.editor.displayEmptyReadOnlySession()
this._deps.config.set('currentFile', '')
}
this.event.trigger('fileClosed', [name])
}
......
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