diff --git a/src/app/tabs/compileTab/compileTab.js b/src/app/tabs/compileTab/compileTab.js index b3ed2af066..cb5f155261 100644 --- a/src/app/tabs/compileTab/compileTab.js +++ b/src/app/tabs/compileTab/compileTab.js @@ -35,7 +35,8 @@ class CompileTab { this.fileManager.saveCurrentFile() this.editor.clearAnnotations() var currentFile = this.config.get('currentFile') - if (!currentFile && !/.(.sol)$/.exec(currentFile)) return + if (!currentFile) return + if (!/\.sol$/.exec(currentFile)) return // only compile *.sol file. var target = currentFile var sources = {}