committed by
GitHub
parent
20d2b4f98d
commit
e4f3964f67
13
node_modules/@babel/helper-simple-access/lib/index.js
generated
vendored
13
node_modules/@babel/helper-simple-access/lib/index.js
generated
vendored
@@ -19,11 +19,12 @@ const {
|
||||
unaryExpression
|
||||
} = _t;
|
||||
|
||||
function simplifyAccess(path, bindingNames) {
|
||||
function simplifyAccess(path, bindingNames, includeUpdateExpression = true) {
|
||||
path.traverse(simpleAssignmentVisitor, {
|
||||
scope: path.scope,
|
||||
bindingNames,
|
||||
seen: new WeakSet()
|
||||
seen: new WeakSet(),
|
||||
includeUpdateExpression
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,8 +33,14 @@ const simpleAssignmentVisitor = {
|
||||
exit(path) {
|
||||
const {
|
||||
scope,
|
||||
bindingNames
|
||||
bindingNames,
|
||||
includeUpdateExpression
|
||||
} = this;
|
||||
|
||||
if (!includeUpdateExpression) {
|
||||
return;
|
||||
}
|
||||
|
||||
const arg = path.get("argument");
|
||||
if (!arg.isIdentifier()) return;
|
||||
const localName = arg.node.name;
|
||||
|
Reference in New Issue
Block a user