diff --git a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs index e2aaf3713901..80e54ea41398 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs @@ -182,7 +182,10 @@ impl TscDecorator { elems: decorators .into_iter() .inspect(|e| { - has_private_access |= Self::has_private_access(e); + if has_private_access { + return; + } + has_private_access = Self::has_private_access(e); }) .map(|mut v| { remove_span(&mut v);