Commit a52165bb authored by yann300's avatar yann300

fix set current file

parent 8d9f78d0
...@@ -338,7 +338,8 @@ class CompileTab { ...@@ -338,7 +338,8 @@ class CompileTab {
this._view.errorContainer = yo`<div></div>` this._view.errorContainer = yo`<div></div>`
this._view.contractSelection = this.contractSelection() this._view.contractSelection = this.contractSelection()
this._view.compilerContainer = this.compilerContainer.render() this._view.compilerContainer = this.compilerContainer.render()
this.compilerContainer.currentFile = this._deps.fileManager.currentFile() const currentFile = this._deps.fileManager.currentFile()
if (currentFile) this.compilerContainer.currentFile = currentFile
this._view.el = yo` this._view.el = yo`
<div id="compileTabView"> <div id="compileTabView">
......
...@@ -30,7 +30,7 @@ class CompilerContainer { ...@@ -30,7 +30,7 @@ class CompilerContainer {
/** /**
* Update the compilation button with the name of the current file * Update the compilation button with the name of the current file
*/ */
set currentFile (name) { set currentFile (name = '') {
if (!this._view.compilationButton) return if (!this._view.compilationButton) return
const button = this.compilationButton(name.split('/').pop()) const button = this.compilationButton(name.split('/').pop())
yo.update(this._view.compilationButton, button) yo.update(this._view.compilationButton, button)
......
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