diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index b4e26182ac..7497a529ae 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -106,9 +106,11 @@ export class CompileTabLogic { const sources = { [target]: { content } } this.event.emit('removeAnnotations') this.event.emit('startingCompilation') - this.api.readFile(this.configFilePath).then( contentConfig => { - this.compiler.set('configFileContent', contentConfig) - }) + if (this.configFilePath) { + this.api.readFile(this.configFilePath).then( contentConfig => { + this.compiler.set('configFileContent', contentConfig) + }) + } // setTimeout fix the animation on chrome... (animation triggered by 'staringCompilation') setTimeout(() => { this.compiler.compile(sources, target); resolve(true) }, 100) }).catch((error) => {