Skip to content

Commit

Permalink
fix(codegen): do not print comments when only annotation_comments i…
Browse files Browse the repository at this point in the history
…s enabled (#9518)

When only `annotation_comments` enabled, we only need to print annotation comments
  • Loading branch information
Dunqing committed Mar 4, 2025
1 parent 9c6ae9f commit 75f06ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/oxc_codegen/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ impl Default for CodegenOptions {

impl CodegenOptions {
pub(crate) fn print_comments(&self) -> bool {
!self.minify
&& (self.comments || self.annotation_comments || self.legal_comments.is_inline())
!self.minify && (self.comments || self.legal_comments.is_inline())
}

pub(crate) fn print_annotation_comments(&self) -> bool {
Expand Down

0 comments on commit 75f06ad

Please sign in to comment.