Skip to content

Commit

Permalink
fix more
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 13, 2024
1 parent 9200ca2 commit 812cf9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/swc_ecma_ast/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,8 @@ impl TryFrom<Box<Expr>> for SimpleAssignTarget {
type Error = Box<Expr>;

fn try_from(e: Box<Expr>) -> Result<Self, Self::Error> {
Ok(match *e {
let e = e.unbox();
Ok(match e {
Expr::Ident(i) => SimpleAssignTarget::Ident(i.into()),
Expr::Member(m) => SimpleAssignTarget::Member(m),
Expr::SuperProp(s) => SimpleAssignTarget::SuperProp(s),
Expand All @@ -1514,7 +1515,7 @@ impl TryFrom<Box<Expr>> for SimpleAssignTarget {
Expr::TsNonNull(n) => SimpleAssignTarget::TsNonNull(n),
Expr::TsTypeAssertion(a) => SimpleAssignTarget::TsTypeAssertion(a),
Expr::TsInstantiation(a) => SimpleAssignTarget::TsInstantiation(a),
_ => return Err(e),
_ => return Err(Box::new(e)),
})
}
}
Expand Down

0 comments on commit 812cf9e

Please sign in to comment.