We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ends_with_alpha_num
1 parent c45e08f commit 569c799Copy full SHA for 569c799
.changeset/foo.md
@@ -0,0 +1,6 @@
1
+---
2
+swc_core: patch
3
+swc_ecma_codegen: patch
4
5
+
6
+fix(es/codegen): Fix binary expression formatting
crates/swc_ecma_codegen/src/util.rs
@@ -70,7 +70,7 @@ impl EndsWithAlphaNum for Expr {
70
Expr::Update(n) => n.prefix && n.arg.ends_with_alpha_num(),
71
72
Expr::OptChain(n) => match n.base.as_ref() {
73
- OptChainBase::Member(base) => base.prop.is_computed(),
+ OptChainBase::Member(base) => !base.prop.is_computed(),
74
OptChainBase::Call(_) => false,
75
},
76
0 commit comments