set current file when compiler is being called through the API.

pull/1342/head
yann300 3 years ago committed by davidzagi93@gmail.com
parent e3aafbcf45
commit ae94f77ae1
  1. 2
      apps/solidity-compiler/src/app/compiler-api.ts

@ -115,11 +115,13 @@ export const CompilerApiMixin = (Base) => class extends Base {
* @param {string} fileName to compile * @param {string} fileName to compile
*/ */
compile (fileName) { compile (fileName) {
this.currentFile = fileName
return this.compileTabLogic.compileFile(fileName) return this.compileTabLogic.compileFile(fileName)
} }
compileFile (event) { compileFile (event) {
if (event.path.length > 0) { if (event.path.length > 0) {
this.currentFile = event.path[0]
this.compileTabLogic.compileFile(event.path[0]) this.compileTabLogic.compileFile(event.path[0])
} }
} }

Loading…
Cancel
Save