make handleImportCall optional

pull/3094/head
Iuri Matias 7 years ago
parent 64e01b3e6b
commit 97b29deaec
  1. 18
      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
}

Loading…
Cancel
Save