Merge pull request #697 from ethereum/fixImport

Fix import
pull/1/head
yann300 7 years ago committed by GitHub
commit 8c0d341790
  1. 7
      src/app/compiler/compiler.js

@ -236,7 +236,12 @@ function Compiler (handleImportCall) {
while ((match = importRegex.exec(files[fileName]))) {
var importFilePath = match[1]
if (importFilePath.startsWith('./')) {
importFilePath = importFilePath.slice(2)
var path = /(.*\/).*/.exec(target)
if (path !== null) {
importFilePath = importFilePath.replace('./', path[1])
} else {
importFilePath = importFilePath.slice(2)
}
}
// FIXME: should be using includes or sets, but there's also browser compatibility..

Loading…
Cancel
Save