improve clarity on og filename find
This commit is contained in:
parent
022b081339
commit
f127f024a6
|
@ -182,9 +182,10 @@ function compileSolc(embark, contractFiles, contractDirectories, options, callba
|
|||
compiledObject[className].userdoc = contract.userdoc;
|
||||
compiledObject[className].filename = filename;
|
||||
const normalized = path.normalize(filename);
|
||||
compiledObject[className].originalFilename = path.normalize(contractFiles.find(contractFile => {
|
||||
return normalized.indexOf(path.normalize(contractFile.originalPath)) > -1;
|
||||
}).originalPath);
|
||||
const origContract = contractFiles.find(contractFile => normalized.includes(path.normalize(contractFile.originalPath)));
|
||||
if (origContract) {
|
||||
compiledObject[className].originalFilename = path.normalize(origContract.originalPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue