We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 520e06a commit 7100648Copy full SHA for 7100648
src/print/MemberExpression.js
@@ -5,13 +5,13 @@ import {
5
wrapExpressionIfNeeded
6
} from "../util/index.js";
7
8
-const { group } = doc.builders;
+const { group, indent, softline } = doc.builders;
9
10
const printMemberExpression = (node, path, print) => {
11
node[EXPRESSION_NEEDED] = false;
12
node[STRING_NEEDS_QUOTES] = true;
13
const parts = [path.call(print, "object")];
14
- parts.push(node.computed ? "[" : ".");
+ parts.push(node.computed ? "[" : indent([softline, "."]));
15
parts.push(path.call(print, "property"));
16
if (node.computed) {
17
parts.push("]");
0 commit comments