fix(@embark/contracts_manager): compare correct property

Compare a contract's `originalFilename` property to a contract file's
normalized `originalPath` property instead of `filename`. The `filename`
property seems to have been removed.
This commit is contained in:
Michael Bradley, Jr 2019-03-31 18:50:47 -05:00 committed by Michael Bradley
parent bb55ae120e
commit 9e4204a492

View File

@ -1,6 +1,6 @@
let async = require('async');
const cloneDeep = require('clone-deep');
const path = require('path');
const utils = require('../../utils/utils.js');
const constants = require('../../constants');
@ -260,7 +260,6 @@ class ContractsManager {
build(done, _useContractFiles = true, resetContracts = true) {
let self = this;
self.contracts = {};
if(resetContracts) self.contracts = {};
async.waterfall([
@ -287,7 +286,7 @@ class ContractsManager {
self.contractsFiles &&
self.contractsFiles.every(contractFile =>
Object.values(self.compiledContracts).find(contract =>
contract.originalFilename === contractFile.filename
contract.originalFilename === path.normalize(contractFile.originalPath)
)
);
callback(null, allContractsCompiled);