Skip to content

Commit

Permalink
Don't change how memeber-chain in printed
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Feb 7, 2022
1 parent efdd22e commit 5f719d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/language-js/printer-estree.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,15 @@ function genericPrint(path, options, print, args) {
const needsParens = pathNeedsParens(path, options);

if (!needsParens) {
return args && args.needsSemi ? [";", parts] : parts;
if (args && args.needsSemi) {
parts.unshift(";");
}

if (isClassExpressionWithDecorators) {
return parts;
}

return printed;
}

if (isClassExpressionWithDecorators) {
Expand Down

0 comments on commit 5f719d5

Please sign in to comment.