reset remappings in case of file deletion

pull/4299/head
aniket-engg 12 months ago committed by Aniket
parent 8a71efdb7e
commit a3d35e241a
  1. 4
      libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts

@ -112,9 +112,9 @@ export class CompileTabLogic {
this.event.emit('startingCompilation') this.event.emit('startingCompilation')
if(await this.api.fileExists('remappings.txt')) { if(await this.api.fileExists('remappings.txt')) {
this.api.readFile('remappings.txt').then(remappings => { this.api.readFile('remappings.txt').then(remappings => {
this.compiler.set('remappings', remappings.split('\n').filter(Boolean)) this.compiler.set('remappings', remappings.split('\n'))
}) })
} } else this.compiler.set('remappings', [])
if (this.configFilePath) { if (this.configFilePath) {
this.api.readFile(this.configFilePath).then( contentConfig => { this.api.readFile(this.configFilePath).then( contentConfig => {
this.compiler.set('configFileContent', contentConfig) this.compiler.set('configFileContent', contentConfig)

Loading…
Cancel
Save