Skip to content

Commit

Permalink
fix(wasm): reference ast from prettier (#5268)
Browse files Browse the repository at this point in the history
regression by cc33328
  • Loading branch information
sxzz authored Aug 27, 2024
1 parent c23104b commit 681bd80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ impl Oxc {
);

if run_options.prettier_format.unwrap_or_default() {
self.prettier_formatted_text = prettier.build(program);
self.prettier_formatted_text = prettier.build(&ret.program);
}

if run_options.prettier_ir.unwrap_or_default() {
let prettier_doc = prettier.doc(program).to_string();
let prettier_doc = prettier.doc(&ret.program).to_string();
self.prettier_ir_text = {
let ret = Parser::new(&allocator, &prettier_doc, SourceType::default()).parse();
Prettier::new(
Expand Down

0 comments on commit 681bd80

Please sign in to comment.