Skip to content

Commit

Permalink
use if-else
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 5, 2022
1 parent 548df28 commit b2503a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/next-swc/crates/core/src/lib.rs
Expand Up @@ -162,9 +162,10 @@ where
)),
_ => Either::Right(noop()),
},
match opts.styled_jsx {
true => Either::Left(styled_jsx::styled_jsx(cm.clone(), file.name.clone())),
_ => Either::Right(noop()),
if opts.styled_jsx {
Either::Left(styled_jsx::styled_jsx(cm.clone(), file.name.clone()))
} else {
Either::Right(noop())
},
hook_optimizer::hook_optimizer(),
match &opts.styled_components {
Expand Down

0 comments on commit b2503a1

Please sign in to comment.