Update call/member expression chaining heuristic to account for NewExpression's
This commit is contained in:
1 parent
d5ab6ab921
commit
fe4484d2e3
1 file changed
+2
-1
+2
-1
@@ -650,7 +650,8 @@ function genericPrintNoParens(path, options, print) {
|
||||
const isChain = nodes.filter(n => {
|
||||
return n.call.arguments.length > 0 &&
|
||||
(n.call.arguments[0].type === "FunctionExpression" ||
|
||||
n.call.arguments[0].type === "ArrowFunctionExpression");
|
||||
n.call.arguments[0].type === "ArrowFunctionExpression" ||
|
||||
n.call.arguments[0].type === "NewExpression");
|
||||
}).length > 1;
|
||||
|
||||
if(hasMultipleLookups) {
|
||||
|
||||
Reference in new issue
Block a user