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 }