@babel/helper-member-expression-to-functions
Advanced tools
Comparing version 7.11.0 to 7.12.0
@@ -105,3 +105,4 @@ "use strict"; | ||
parent, | ||
parentPath | ||
parentPath, | ||
scope | ||
} = member; | ||
@@ -126,2 +127,8 @@ | ||
}); | ||
if (scope.path.isPattern()) { | ||
endPath.replaceWith(t.callExpression(t.arrowFunctionExpression([], endPath.node), [])); | ||
return; | ||
} | ||
const rootParentPath = endPath.parentPath; | ||
@@ -161,5 +168,2 @@ | ||
const { | ||
scope | ||
} = member; | ||
const startingProp = startingOptional.isOptionalMemberExpression() ? "object" : "callee"; | ||
@@ -311,2 +315,7 @@ const startingNode = startingOptional.node[startingProp]; | ||
})) { | ||
if (scope.path.isPattern()) { | ||
parentPath.replaceWith(t.callExpression(t.arrowFunctionExpression([], parentPath.node), [])); | ||
return; | ||
} | ||
parentPath.replaceWith(this.optionalCall(member, parent.arguments)); | ||
@@ -313,0 +322,0 @@ return; |
{ | ||
"name": "@babel/helper-member-expression-to-functions", | ||
"version": "7.11.0", | ||
"version": "7.12.0", | ||
"description": "Helper function to replace certain member expressions with function calls", | ||
@@ -17,4 +17,4 @@ "repository": { | ||
"dependencies": { | ||
"@babel/types": "^7.11.0" | ||
"@babel/types": "^7.12.0" | ||
} | ||
} | ||
} |
12474
281
Updated@babel/types@^7.12.0