Skip to content

Commit

Permalink
Update swc_core
Browse files Browse the repository at this point in the history
Closes GH-20.

Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
kdy1 committed Mar 13, 2023
1 parent 865c5ea commit b8ec34d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ serializable = ["serde"]
[dependencies]
markdown = "1.0.0-alpha.7"
serde = { version = "1", optional = true }
swc_core = { version = "0.59.0", features = [
swc_core = { version = "0.69.0", features = [
"ecma_ast",
"ecma_visit",
"ecma_codegen",
Expand Down
4 changes: 2 additions & 2 deletions src/mdx_plugin_recma_jsx_rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,15 +473,15 @@ impl<'a> State<'a> {
decl.function.body.as_mut().unwrap()
}
Func::Arrow(arr) => {
if let BlockStmtOrExpr::Expr(expr) = &mut arr.body {
if let BlockStmtOrExpr::Expr(expr) = &mut *arr.body {
let block = BlockStmt {
stmts: vec![Stmt::Return(ReturnStmt {
arg: Some(expr.take()),
span: DUMMY_SP,
})],
span: DUMMY_SP,
};
arr.body = BlockStmtOrExpr::BlockStmt(block);
arr.body = Box::new(BlockStmtOrExpr::BlockStmt(block));
}
arr.body.as_mut_block_stmt().unwrap()
}
Expand Down

0 comments on commit b8ec34d

Please sign in to comment.