diff --git a/src/util/internalCallTree.js b/src/util/internalCallTree.js index d238308306..133575555a 100644 --- a/src/util/internalCallTree.js +++ b/src/util/internalCallTree.js @@ -14,19 +14,15 @@ class InternalCallTree { this.sourceLocationTracker = new SourceLocationTracker(codeManager) debuggerEvent.register('newTraceLoaded', (trace) => { this.reset() - this.buildTree(trace) + if (!this.solidityProxy.loaded()) { + console.log('compilation result not loaded. Cannot build internal call tree') + } else { + buildTree(this, 0, '', trace) + } this.event.trigger('callTreeReady', [this.scopes, this.scopeStarts]) }) } - buildTree (trace) { - if (!this.solidityProxy.loaded()) { - console.log('compilation result not loaded. Cannot build internal call tree') - } else { - buildTree(this, 0, '', trace) - } - } - reset () { this.scopes = {} this.scopeStarts = {}