diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-30 20:31:01 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-30 21:04:19 +0800 |
commit | e23f90e41c177552aa7e1bde98c6ba1b7acb9d4f (patch) | |
tree | afd1a7ad10590690af1543ad57e51a62a268dc71 /packages/sol-tracing-utils/src | |
parent | 25e42c0ad47e9ec06e474cd12a488ae837660302 (diff) | |
download | dexon-0x-contracts-e23f90e41c177552aa7e1bde98c6ba1b7acb9d4f.tar.gz dexon-0x-contracts-e23f90e41c177552aa7e1bde98c6ba1b7acb9d4f.tar.zst dexon-0x-contracts-e23f90e41c177552aa7e1bde98c6ba1b7acb9d4f.zip |
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); |