aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-tracing-utils/src/ast_visitor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-tracing-utils/src/ast_visitor.ts')
-rw-r--r--packages/sol-tracing-utils/src/ast_visitor.ts4
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);