fix set current file

pull/1/head
yann300 6 years ago
parent 8d9f78d0c9
commit a52165bb33
  1. 3
      src/app/tabs/compile-tab.js
  2. 2
      src/app/tabs/compileTab/compilerContainer.js

@ -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 {
/** /**
* 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)

Loading…
Cancel
Save