From a74538eba030a4fa0b4b410a052c814006114fcc Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 27 Feb 2019 10:54:43 +0100 Subject: [PATCH] use visit contract instead of getContract --- src/app/tabs/compile-tab.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index e499e2404b..3de65ff930 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -87,11 +87,11 @@ class CompileTab { }) } // Update contract Selection - const contractMap = this.compiler.getContracts() - const contractSelection = this.contractSelection(Object.keys(contractMap) || []) + let contractMap = {} + if (success) this.compiler.visitContracts((contract) => { contractMap[contract.name] = contract }) + let contractSelection = this.contractSelection(Object.keys(contractMap) || []) yo.update(this._view.contractSelection, contractSelection) - let error = false if (data['error']) { error = true this._deps.renderer.error(data['error'].formattedMessage, this._view.errorContainer, {type: data['error'].severity || 'error'})