Skip to content

Commit

Permalink
fix(codegen): do not print comments when only annotation_comments is …
Browse files Browse the repository at this point in the history
…enabled
  • Loading branch information
Dunqing committed Mar 3, 2025
1 parent 9c6ae9f commit 805c751
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 805c751

Please sign in to comment.