diff options
author | 2023-01-20 00:06:27 -0800 | |
---|---|---|
committer | 2023-01-20 00:06:27 -0800 | |
commit | 3a100af876836fcdbe9b36da0642289284cd6a1b (patch) | |
tree | 166c1efa64a89046b00479d426be40bd299fa347 /src/js_parser.zig | |
parent | 7d7b5350147e16bee0c173eef995b6abe6250932 (diff) | |
download | bun-3a100af876836fcdbe9b36da0642289284cd6a1b.tar.gz bun-3a100af876836fcdbe9b36da0642289284cd6a1b.tar.zst bun-3a100af876836fcdbe9b36da0642289284cd6a1b.zip |
Fixes #1855
Diffstat (limited to 'src/js_parser.zig')
-rw-r--r-- | src/js_parser.zig | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig index c20300daa..ee54a892a 100644 --- a/src/js_parser.zig +++ b/src/js_parser.zig @@ -16935,12 +16935,13 @@ fn NewParser_( ) []Stmt { switch (stmtorexpr) { .stmt => |stmt| { - if (!stmt.data.s_class.class.has_decorators) { - var stmts = p.allocator.alloc(Stmt, 1) catch unreachable; - stmts[0] = stmt; - return stmts; + if (comptime !is_typescript_enabled) { + if (!stmt.data.s_class.class.has_decorators) { + var stmts = p.allocator.alloc(Stmt, 1) catch unreachable; + stmts[0] = stmt; + return stmts; + } } - var class = &stmt.data.s_class.class; var constructor_function: ?*E.Function = null; |