Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Fix artifactor warning when given contractName
Browse files Browse the repository at this point in the history
  • Loading branch information
g. nicholas d'andrea committed Feb 4, 2021
1 parent 2d16831 commit 21574e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/artifactor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ class Artifactor {
if (Array.isArray(artifactObjects)) {
const tmpArtifactArray = artifactObjects;
tmpArtifactArray.forEach(artifactObj => {
if (newArtifactObjects[artifactObj.contract_name]) {
if (newArtifactObjects[artifactObj.contract_name || artifactObj.contractName]) {
console.warn(
`${OS.EOL}> Duplicate contract names found for ${
artifactObj.contract_name
}.${OS.EOL}` +
`> This can cause errors and unknown behavior. Please rename one of your contracts.`
);
}
newArtifactObjects[artifactObj.contract_name] = artifactObj;
newArtifactObjects[artifactObj.contract_name || artifactObj.contractName] = artifactObj;
});
} else {
newArtifactObjects = artifactObjects;
Expand Down

0 comments on commit 21574e7

Please sign in to comment.