From f25d45e07115658b1c1ff406a3f70ac893268c9c Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 13 Sep 2021 11:59:58 +0200 Subject: [PATCH] set current file when compiler is being called through the API. --- apps/solidity-compiler/src/app/compiler-api.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index 9a96319e9a..eb28191fb6 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -115,11 +115,13 @@ export const CompilerApiMixin = (Base) => class extends Base { * @param {string} fileName to compile */ compile (fileName) { + this.currentFile = fileName return this.compileTabLogic.compileFile(fileName) } compileFile (event) { if (event.path.length > 0) { + this.currentFile = event.path[0] this.compileTabLogic.compileFile(event.path[0]) } }