diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-30 21:11:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 21:11:53 +0800 |
commit | c9a7ef18dc75675bb1880734ce786ba126359ae6 (patch) | |
tree | afd1a7ad10590690af1543ad57e51a62a268dc71 /packages/sol-tracing-utils/src | |
parent | 25e42c0ad47e9ec06e474cd12a488ae837660302 (diff) | |
parent | e23f90e41c177552aa7e1bde98c6ba1b7acb9d4f (diff) | |
download | dexon-0x-contracts-c9a7ef18dc75675bb1880734ce786ba126359ae6.tar.gz dexon-0x-contracts-c9a7ef18dc75675bb1880734ce786ba126359ae6.tar.zst dexon-0x-contracts-c9a7ef18dc75675bb1880734ce786ba126359ae6.zip |
Merge pull request #1557 from 0xProject/fix/sol-cov/property-range-of-null
Fix the `cannot read property range of null` bug
Diffstat (limited to 'packages/sol-tracing-utils/src')
-rw-r--r-- | packages/sol-tracing-utils/src/ast_visitor.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/sol-tracing-utils/src/ast_visitor.ts b/packages/sol-tracing-utils/src/ast_visitor.ts index 1ac9cd1de..27f19378b 100644 --- a/packages/sol-tracing-utils/src/ast_visitor.ts +++ b/packages/sol-tracing-utils/src/ast_visitor.ts @@ -89,7 +89,9 @@ export class ASTVisitor { this._visitStatement(ast); } public ExpressionStatement(ast: Parser.ExpressionStatement): void { - this._visitStatement(ast.expression); + if (!_.isNull(ast.expression)) { + this._visitStatement(ast.expression); + } } public InlineAssemblyStatement(ast: Parser.InlineAssemblyStatement): void { this._visitStatement(ast); |