Skip to content

Commit

Permalink
Fix runtime type error on undefined source (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio authored Jan 18, 2023
1 parent c5856e9 commit 7eda011
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add support for celo and celo-alfajores to manifest file names. ([#710](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/710))
- Only consider errors from functions in use. Validate free functions. ([#702](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/702))
- Improve handling of NatSpec comments. ([#717](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/717)) ([#720](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/720))
- Fix runtime type error. ([#721](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/721))

## 1.20.6 (2022-12-15)

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/src-decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function solcInputOutputDecoder(solcInput: SolcInput, solcOutput: SolcOut
if (sourcePath === undefined) {
throw new Error(`Source file not available`);
}
const content = solcInput.sources[sourcePath].content;
const content = solcInput.sources[sourcePath]?.content;
const name = path.relative(basePath, sourcePath);
if (content === undefined) {
throw new Error(`Content for ${name} not available`);
Expand Down

0 comments on commit 7eda011

Please sign in to comment.