mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-26 21:51:06 +00:00
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:
parent
bb55ae120e
commit
9e4204a492
@ -1,6 +1,6 @@
|
|||||||
let async = require('async');
|
let async = require('async');
|
||||||
const cloneDeep = require('clone-deep');
|
const cloneDeep = require('clone-deep');
|
||||||
|
const path = require('path');
|
||||||
const utils = require('../../utils/utils.js');
|
const utils = require('../../utils/utils.js');
|
||||||
const constants = require('../../constants');
|
const constants = require('../../constants');
|
||||||
|
|
||||||
@ -260,7 +260,6 @@ class ContractsManager {
|
|||||||
|
|
||||||
build(done, _useContractFiles = true, resetContracts = true) {
|
build(done, _useContractFiles = true, resetContracts = true) {
|
||||||
let self = this;
|
let self = this;
|
||||||
self.contracts = {};
|
|
||||||
|
|
||||||
if(resetContracts) self.contracts = {};
|
if(resetContracts) self.contracts = {};
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
@ -287,7 +286,7 @@ class ContractsManager {
|
|||||||
self.contractsFiles &&
|
self.contractsFiles &&
|
||||||
self.contractsFiles.every(contractFile =>
|
self.contractsFiles.every(contractFile =>
|
||||||
Object.values(self.compiledContracts).find(contract =>
|
Object.values(self.compiledContracts).find(contract =>
|
||||||
contract.originalFilename === contractFile.filename
|
contract.originalFilename === path.normalize(contractFile.originalPath)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
callback(null, allContractsCompiled);
|
callback(null, allContractsCompiled);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user