diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-22 02:06:53 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-22 02:06:53 +0800 |
commit | 8e2c0bb97758a978f704ad8aea916cbfe43abc16 (patch) | |
tree | d0a49d1e2daf720deea5bbb749a4184518038ee3 /packages/sol-cov/src/collect_coverage_entries.ts | |
parent | c34897036e8cf896e6d0b3c7733ed9c739921f74 (diff) | |
parent | 88500e37146dc9152050fdd810f9f3c3cc5faf9f (diff) | |
download | dexon-0x-contracts-8e2c0bb97758a978f704ad8aea916cbfe43abc16.tar.gz dexon-0x-contracts-8e2c0bb97758a978f704ad8aea916cbfe43abc16.tar.zst dexon-0x-contracts-8e2c0bb97758a978f704ad8aea916cbfe43abc16.zip |
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/mobile-friendly-onboarding
Diffstat (limited to 'packages/sol-cov/src/collect_coverage_entries.ts')
-rw-r--r-- | packages/sol-cov/src/collect_coverage_entries.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/sol-cov/src/collect_coverage_entries.ts b/packages/sol-cov/src/collect_coverage_entries.ts index b145f044e..3fc85008c 100644 --- a/packages/sol-cov/src/collect_coverage_entries.ts +++ b/packages/sol-cov/src/collect_coverage_entries.ts @@ -10,7 +10,7 @@ const coverageEntriesBySourceHash: { [sourceHash: string]: CoverageEntriesDescri export const collectCoverageEntries = (contractSource: string) => { const sourceHash = ethUtil.sha3(contractSource).toString('hex'); - if (_.isUndefined(coverageEntriesBySourceHash[sourceHash])) { + if (_.isUndefined(coverageEntriesBySourceHash[sourceHash]) && !_.isUndefined(contractSource)) { const ast = parser.parse(contractSource, { range: true }); const locationByOffset = getLocationByOffset(contractSource); const visitor = new ASTVisitor(locationByOffset); |