diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 158c02d0b3..4476f3b384 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -338,7 +338,8 @@ class CompileTab { this._view.errorContainer = yo`
` this._view.contractSelection = this.contractSelection() 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`
diff --git a/src/app/tabs/compileTab/compilerContainer.js b/src/app/tabs/compileTab/compilerContainer.js index d392d4d105..be198ed735 100644 --- a/src/app/tabs/compileTab/compilerContainer.js +++ b/src/app/tabs/compileTab/compilerContainer.js @@ -30,7 +30,7 @@ class CompilerContainer { /** * Update the compilation button with the name of the current file */ - set currentFile (name) { + set currentFile (name = '') { if (!this._view.compilationButton) return const button = this.compilationButton(name.split('/').pop()) yo.update(this._view.compilationButton, button)