Skip to content

Commit 61263ef

Browse files
committed
fix: Simplify condition for handling arguments identifier in spread transform
1 parent a38797c commit 61263ef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/swc_ecma_compat_es2015/src/spread.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,7 @@ impl Spread {
288288
// https://github.com/babel/babel/blob/61ad8555b875cb0c0996f18f803b6bf1d2150173/packages/babel-plugin-transform-spread/src/index.ts#L43-L47
289289
let expr = match *expr {
290290
Expr::Ident(Ident { ref sym, ctxt, .. })
291-
if &**sym == "arguments"
292-
&& (ctxt == self.unresolved_ctxt
293-
|| ctxt == SyntaxContext::empty()) =>
291+
if &**sym == "arguments" && ctxt == self.unresolved_ctxt =>
294292
{
295293
CallExpr {
296294
span,

0 commit comments

Comments
 (0)