From 97f8454cae95b142ddd03a12f2586f4ad3dd9452 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 11 Jan 2017 16:51:49 +0100 Subject: [PATCH] do not throw if ast not found --- src/solidity/solidityProxy.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/solidity/solidityProxy.js b/src/solidity/solidityProxy.js index c1afa2187f..7a33745613 100644 --- a/src/solidity/solidityProxy.js +++ b/src/solidity/solidityProxy.js @@ -113,7 +113,12 @@ class SolidityProxy { */ ast (sourceLocation) { var file = this.sourceList[sourceLocation.file] - return this.sources[file].AST + if (this.sources[file]) { + return this.sources[file].AST + } else { + console.log('AST not found for file id ' + sourceLocation.file) + return null + } } }