From 97b29deaeceb6d8f1f350490a2ff23c1d743e0bd Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 30 Jan 2018 16:25:32 -0500 Subject: [PATCH] make handleImportCall optional --- remix-solidity/src/compiler/compiler.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/remix-solidity/src/compiler/compiler.js b/remix-solidity/src/compiler/compiler.js index d5b59cc567..98c4eedafc 100644 --- a/remix-solidity/src/compiler/compiler.js +++ b/remix-solidity/src/compiler/compiler.js @@ -324,14 +324,16 @@ function Compiler (handleImportCall) { continue } - handleImportCall(m, function (err, content) { - if (err) { - cb(err) - } else { - files[m] = { content } - gatherImports(files, target, importHints, cb) - } - }) + if (handleImportCall) { + handleImportCall(m, function (err, content) { + if (err) { + cb(err) + } else { + files[m] = { content } + gatherImports(files, target, importHints, cb) + } + }) + } return }