aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser/js_parser.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/js_parser/js_parser.zig')
-rw-r--r--src/js_parser/js_parser.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js_parser/js_parser.zig b/src/js_parser/js_parser.zig
index 809a97e26..356f040b2 100644
--- a/src/js_parser/js_parser.zig
+++ b/src/js_parser/js_parser.zig
@@ -15427,7 +15427,10 @@ pub fn NewParser(
this.require_transposer = @TypeOf(this.require_transposer).init(this);
this.require_resolve_transposer = @TypeOf(this.require_resolve_transposer).init(this);
- if (opts.features.top_level_await) this.fn_or_arrow_data_parse.allow_await = .allow_expr;
+ if (opts.features.top_level_await) {
+ this.fn_or_arrow_data_parse.allow_await = .allow_expr;
+ this.fn_or_arrow_data_parse.is_top_level = true;
+ }
}
};
}