Skip to content

Commit

Permalink
feat(codegen): minify for (_ of []) -> for(_ of[]) (#8086)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Dec 24, 2024
1 parent 8b8cbcd commit f873139
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/oxc_codegen/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ impl Gen for ForOfStatement<'_> {
self.left.print(p, ctx);
p.print_soft_space();
p.print_space_before_identifier();
p.print_str("of ");
p.print_str("of");
p.print_soft_space();
self.right.print_expr(p, Precedence::Comma, Context::empty());
p.print_ascii_byte(b')');
p.print_body(&self.body, false, ctx);
Expand Down

0 comments on commit f873139

Please sign in to comment.