Skip to content

Commit

Permalink
remove unnecessary if-else
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Mar 20, 2024
1 parent 39470c1 commit 449bb98
Showing 1 changed file with 11 additions and 26 deletions.
37 changes: 11 additions & 26 deletions sources/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,32 +116,17 @@ const App = () => {
setInputScala(result);
};

let r;
if (scalameta === "latest") {
r = main.convert(
inputScala,
outputType,
packageName,
wildcardImport,
ruleName,
dialect,
patch,
removeNewFields,
initialExtractor,
);
} else {
r = main.convert(
inputScala,
outputType,
packageName,
wildcardImport,
ruleName,
dialect,
patch,
removeNewFields,
initialExtractor,
);
}
let r = main.convert(
inputScala,
outputType,
packageName,
wildcardImport,
ruleName,
dialect,
patch,
removeNewFields,
initialExtractor,
);

if (r.ast == null || format === false) {
} else {
Expand Down

0 comments on commit 449bb98

Please sign in to comment.