improve clarity on og filename find

This commit is contained in:
Jonathan Rainville 2019-04-09 08:58:17 -04:00
parent 022b081339
commit f127f024a6
1 changed files with 4 additions and 3 deletions

View File

@ -182,9 +182,10 @@ function compileSolc(embark, contractFiles, contractDirectories, options, callba
compiledObject[className].userdoc = contract.userdoc; compiledObject[className].userdoc = contract.userdoc;
compiledObject[className].filename = filename; compiledObject[className].filename = filename;
const normalized = path.normalize(filename); const normalized = path.normalize(filename);
compiledObject[className].originalFilename = path.normalize(contractFiles.find(contractFile => { const origContract = contractFiles.find(contractFile => normalized.includes(path.normalize(contractFile.originalPath)));
return normalized.indexOf(path.normalize(contractFile.originalPath)) > -1; if (origContract) {
}).originalPath); compiledObject[className].originalFilename = path.normalize(origContract.originalPath);
}
} }
} }