fix(embark/solidity): fix getting the original filename of contracts

This commit is contained in:
Jonathan Rainville 2019-03-14 13:37:43 -04:00 committed by Iuri Matias
parent aba4e0e059
commit 4d424c06b9
1 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,8 @@ class Solidity {
compiled_object[className].abiDefinition = contract.abi; compiled_object[className].abiDefinition = contract.abi;
compiled_object[className].userdoc = contract.userdoc; compiled_object[className].userdoc = contract.userdoc;
compiled_object[className].filename = filename; compiled_object[className].filename = filename;
compiled_object[className].originalFilename = originalFilepaths[path.basename(filename)]; const normalized = path.normalize(filename);
compiled_object[className].originalFilename = Object.values(originalFilepaths).find(ogFilePath => normalized.indexOf(ogFilePath) > -1);
} }
} }